Random sequential spawn/activation of AI Aircraft - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 08-14-2019, 12:57 AM   #1
PSYKOnz
Junior Member
 
PSYKOnz's Avatar
 
Join Date: Mar 2019
Posts: 63
Default 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
__________________
"I do it 'cause the whole worlds gone crazy
And This is the end!" - Lzzy Hale

Last edited by PSYKOnz; 08-14-2019 at 01:02 AM.
PSYKOnz is offline   Reply With Quote
Old 08-14-2019, 02:18 AM   #2
feefifofum
3rd Party Developer
 
feefifofum's Avatar
 
Join Date: Jan 2015
Location: USA
Posts: 3,094
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
Old 08-14-2019, 02:32 AM   #3
PSYKOnz
Junior Member
 
PSYKOnz's Avatar
 
Join Date: Mar 2019
Posts: 63
Default

AWESOME thank you so much, ill give it a shot
__________________
"I do it 'cause the whole worlds gone crazy
And This is the end!" - Lzzy Hale
PSYKOnz is offline   Reply With Quote
Old 08-16-2019, 05:55 AM   #4
PSYKOnz
Junior Member
 
PSYKOnz's Avatar
 
Join Date: Mar 2019
Posts: 63
Default

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?
__________________
"I do it 'cause the whole worlds gone crazy
And This is the end!" - Lzzy Hale

Last edited by PSYKOnz; 08-17-2019 at 12:38 AM.
PSYKOnz is offline   Reply With Quote
Old 08-17-2019, 12:38 AM   #5
PSYKOnz
Junior Member
 
PSYKOnz's Avatar
 
Join Date: Mar 2019
Posts: 63
Default

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
__________________
"I do it 'cause the whole worlds gone crazy
And This is the end!" - Lzzy Hale

Last edited by PSYKOnz; 08-20-2019 at 12:17 AM.
PSYKOnz is offline   Reply With Quote
Old 08-18-2019, 08:33 PM   #6
feefifofum
3rd Party Developer
 
feefifofum's Avatar
 
Join Date: Jan 2015
Location: USA
Posts: 3,094
Default

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.
Attached Files
File Type: miz sequential random spawn.miz (8.8 KB, 8 views)
feefifofum is offline   Reply With Quote
Old 08-19-2019, 09:14 PM   #7
PSYKOnz
Junior Member
 
PSYKOnz's Avatar
 
Join Date: Mar 2019
Posts: 63
Default

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
__________________
"I do it 'cause the whole worlds gone crazy
And This is the end!" - Lzzy Hale
PSYKOnz is offline   Reply With Quote
Old 08-20-2019, 12:17 AM   #8
PSYKOnz
Junior Member
 
PSYKOnz's Avatar
 
Join Date: Mar 2019
Posts: 63
Default

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
Attached Files
File Type: miz NZArmA TRANING.miz (361.4 KB, 7 views)
__________________
"I do it 'cause the whole worlds gone crazy
And This is the end!" - Lzzy Hale
PSYKOnz is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 06:48 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.