deadlyfishes Posted May 18, 2016 Posted May 18, 2016 So I am working on something that is a bit more dynamic. A key to my mission that I'm making is randomization. I get you can set a % of the possibility of a unit spawning, but I want to do something a bit different; I have enemy 5 bases on the map, and they only appear if their commander appears. I want there to be only 1 base active at a time, so I need 1 out of 5 commanders to spawn after a certain event. Is there a way or script I could do for the game to randomly choose 1 out of the 5 commanders in my mission? Making each commander having a % of chance to spawn would possibly result in more than one base being active at once. Any insight on this? Thanks! "Through The Inferno" - Endless, Dynamic, Open-World Experience for DCS World Website | Discord | Support TTI on Patreon SP Missions: Caucasus | NTTR | Syria | Afghanistan | Iraq | Mariana Islands | Persian Gulf Normandy | South Atlantic | Sinai | Kola | Cold War Germany MP Servers: PvE Server TTI x Pimax - Get discounts on Pimax Headsets
Bearfoot Posted May 18, 2016 Posted May 18, 2016 Without using scripting (just the ME): Assign a flag a random value between 1 and 5. Create five triggers, each on based on a different flag value, and each one activating a different group. Scripting will make things a lot less tedious and easier to maintain/change/extend, of course, so that would be the approach I would recommend. 1
DarkCrow Posted May 18, 2016 Posted May 18, 2016 Yes, use a flag with a range value of 1-5.Then have the event set a random value to that flag. Define which commander spawns to each value of the flag. Sent from my iPhone using Tapatalk
deadlyfishes Posted May 19, 2016 Author Posted May 19, 2016 [ATTACH][ATTACH][ATTACH]140841[/ATTACH][/ATTACH][/ATTACH] Very helpful! Thanks! I think this opened up a can of worms because I'll be thinking of ways for the game to now pick either Commander A or B for each location, so it will be a random spawn and also a random Commander :D Eventually I will be doing a sort of "capture" each base sort of mission that you can keep playing for a long time. But, for now I'll see what I can do with these variables. Thanks again. "Through The Inferno" - Endless, Dynamic, Open-World Experience for DCS World Website | Discord | Support TTI on Patreon SP Missions: Caucasus | NTTR | Syria | Afghanistan | Iraq | Mariana Islands | Persian Gulf Normandy | South Atlantic | Sinai | Kola | Cold War Germany MP Servers: PvE Server TTI x Pimax - Get discounts on Pimax Headsets
Recommended Posts