Page 1 of 1

Re: Randomizing Objective Object Locations

Posted: Fri Mar 31, 2017 12:10 am
by Diamondback
The only thing that comes to mind would be if you spawn those objectives at each map start via an in-game admin command such as !spawn objective (or something of the sort, depending on how you bind your admin command to the object to be spawned). The objectives would have different coordinates that have been set and determined before hand and depending on where you want the objective to spawn, you run the appropriate command for it (for example, !kitchen would spawn the kitchen objective).

As you may have guessed the downfall with that would be that you would have to type the command every time the map starts, i.e. its not automatic. To make this automatic then I guess you can just make a new CON file somewhere in your Settings folder and type in the appropriate code, however I have no idea how the game would know how to spawn a different objective each round.

Maybe you can make a conditional statement that runs objective A when the map round number is odd and objective B when it is even? Just a bunch of ideas lol sorry for the novel here.

Re: Randomizing Objective Object Locations

Posted: Fri Mar 31, 2017 3:03 am
by Swaffy
I got some results while searching "random weapons".

http://bfmods.com/viewtopic.php?f=6&t=1812

http://bfmods.com/viewtopic.php?f=43&t=1749&p=12543

It may be sequential though. Worth a try. I think effects use a randomizer of some sort but I don't know how to use that.

Re: Randomizing Objective Object Locations

Posted: Fri Dec 22, 2017 9:24 pm
by takiwa
Could you make a dummy PCO for the objective and spawn the actual objective from it to a random location by using multiple spawn locations?

Re: Randomizing Objective Object Locations

Posted: Sun Dec 24, 2017 4:16 pm
by Diamondback
takiwa wrote:Could you make a dummy PCO for the objective and spawn the actual objective from it to a random location by using multiple spawn locations?
The thing is, will object spawns behave like soldier spawns and spawn randomly? I think if you use that method all the objects that are tied to the dummy PCO will spawn at once at the locations that have been set on the spawner. It's worth testing though.

Re: Randomizing Objective Object Locations

Posted: Thu Dec 28, 2017 2:27 am
by takiwa
rem ----- ObjectiveComplex -----
ObjectTemplate.create Bundle ObjectiveComplex
ObjectTemplate.setNetworkableInfo Objective_info
rem -------------------------------------
ObjectTemplate.addTemplate RandomObjectiveSpawner
ObjectTemplate.setRandomGeometries 4

rem ----- RandomObjectiveSpawner -----
ObjectTemplate.create Bundle RandomObjectiveSpawner1
ObjectTemplate.geometry bullet
rem -------------------------------------
ObjectTemplate.addTemplate ObjectiveSpawner
ObjectTemplate setPosition 0/0/10
rem -------------------------------------
ObjectTemplate.create Bundle RandomObjectiveSpawner2
ObjectTemplate.geometry bullet
rem -------------------------------------
ObjectTemplate.addTemplate ObjectiveSpawner
ObjectTemplate setPosition 0/0/-10
rem -------------------------------------
ObjectTemplate.create Bundle RandomObjectiveSpawner3
ObjectTemplate.geometry bullet
rem -------------------------------------
ObjectTemplate.addTemplate ObjectiveSpawner
ObjectTemplate setPosition 0/0/20
rem -------------------------------------
ObjectTemplate.create Bundle RandomObjectiveSpawner4
ObjectTemplate.geometry bullet
rem -------------------------------------
ObjectTemplate.addTemplate ObjectiveSpawner
ObjectTemplate setPosition 0/0/-20

then define the ObjectiveSpawner as your Objective...wouldn't this give you 4 random placements? Granted, they are still predefined, but you wouldn't know which one you would get. Increase the random geoms to add more...just a thought, haven't tested it so I don't even know if this would work.

Re: Randomizing Objective Object Locations

Posted: Wed Jan 03, 2018 1:32 am
by takiwa
you are correct, they aren't truly random, but close...and I see no other way of getting a "random" spawn to work in this engine...