ED Forums - View Single Post - Random sequential spawn/activation of AI Aircraft
View Single Post
Old 08-14-2019, 02:18 AM   #2
feefifofum
3rd Party Developer
 
feefifofum's Avatar
 
Join Date: Jan 2015
Location: USA
Posts: 3,119
Default

SWITCHED CONDITION (player activates radio, NO EVENT)
-
FLAG IS TRUE (1)
-
SET FLAG RANDOM VALUE (100, 1,6)
FLAG OFF (1) -- it's important to turn the flag back off or the radio item only works once

================

SWITCHED CONDITION (re-roll, NO EVENT)
-
FLAG EQUALS (100, 1)
FLAG IS TRUE (101)
OR
FLAG EQUALS (100, 2)
FLAG IS TRUE (102)
etc.
-
SET FLAG RANDOM VALUE (100, 1, 6)
===============

ONCE (Group 1 spawn, NO EVENT)
-
FLAG EQUALS (100, 1)
-
GROUP ACTIVATE (Group 1)
FLAG ON (101)
==============
Repeat above for each group.
==============
1 ONCE (Mission Complete, NO EVENT)
-
FLAG IS TRUE (101)
FLAG IS TRUE (102)
FLAG IS TRUE (103)
FLAG IS TRUE (104)
FLAG IS TRUE (105)
FLAG IS TRUE (106)
-
MESSAGE TO ALL ('All groups have been activated', 10)
RADIO ITEM REMOVE (Activate Group)
FLAG OFF (100)


That's the quick & dirty version. A flag to act as the random number generator, a set of flags to check if a group has been spawned already and re-roll, and a trigger to check when all groups have been destroyed. Hope that gets you there.
feefifofum is offline   Reply With Quote