Jump to content

Random sequential spawn/activation of AI Aircraft


Recommended Posts

hi there. I'm looking for a SIMPLE NON SCRIPT BASED way to randomly activate groups of AI Aircraft sequentially.

 

I have 6 flights sitting on runways around the map uncontrolled that will when activated scramble and fly towards an area to engage the players

 

I currently have all AI Aircraft Scrambling on a single radio command

 

 

here is what I'm trying to achieve

 

 

- The players activate through radio command

 

- THEN

 

-mission randomly scrambles one of the 6 groups

 

- player defeats group

 

-Mission randomly scrambles one of the remaining 5 groups

 

- player defeats group

 

-Mission randomly scrambles one of the remaining 4 groups

 

lather rinse repeat until all groups are dead

 

 

 

 

I would also like to have it so if the player re-radios the aircraft it will randomly scramble the next group so they can make it harder with more aircraft

 

and finally, the radio command is removed once all ai groups are dead

 

 

any help would be much appreciated. I am exceptionally new to DCS Mission making so go easy on me hahaha :helpsmilie:


Edited by PSYKOnz

Tomcat, Tomcat über allen

Link to comment
Share on other sites

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. :thumbup:

Link to comment
Share on other sites

I have tried and tried, done everything exactly as instructed, I still can't get it to work!

 

can you please take a look and help me to understand where I went wrong?


Edited by PSYKOnz

Tomcat, Tomcat über allen

Link to comment
Share on other sites

ok so i figured out that part of the problem was I had it set to activate group rather than push AI to start but even then it doesn't seem to work properly, I had to click the radio command twice to get it to randomly start the mig21s, but then the next 3 times I started the mission and selected the radio option nothing happened.

 

attached is the up to date mission file,

 

what am I doing wrong?

 

again I'm looking for a one-time activation via radio that randomly starts the flights each time the preceding flight is shot down


Edited by PSYKOnz

Tomcat, Tomcat über allen

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...