ED Forums

ED Forums (https://forums.eagle.ru/index.php)
-   Missions and Campaigns (https://forums.eagle.ru/forumdisplay.php?f=165)
-   -   Random sequential spawn/activation of AI Aircraft (https://forums.eagle.ru/showthread.php?t=247593)

PSYKOnz 08-14-2019 12:57 AM

Random sequential spawn/activation of AI Aircraft
 
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:

feefifofum 08-14-2019 02:18 AM

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:

PSYKOnz 08-14-2019 02:32 AM

AWESOME thank you so much, ill give it a shot

PSYKOnz 08-16-2019 05:55 AM

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?

PSYKOnz 08-17-2019 12:38 AM

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

feefifofum 08-18-2019 08:33 PM

1 Attachment(s)
I thought you wanted the player to control each spawn...that's a little bit different but the basic idea is still the same..didn't test your .miz but this should work.

PSYKOnz 08-19-2019 09:14 PM

I was able to fix all the issues I was having with the random spawn, now ill try get this one to work, ill post up my results when it's done :) or if I need further help

PSYKOnz 08-20-2019 12:17 AM

1 Attachment(s)
looks like I managed to nail it!

thank you so much for all your help, I was able to get both types of random span working perfectly.

I've attached the mission file if you want to take a look

feefifofum 08-20-2019 02:43 AM

Glad you got it sorted. :thumbup:


All times are GMT. The time now is 08:54 AM.

Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.