Need some help with a specific F10 menu spawn dilemma. - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 02-12-2019, 02:37 AM   #1
statrekmike
Member
 
Join Date: Dec 2011
Location: Providence RI
Posts: 431
Default Need some help with a specific F10 menu spawn dilemma.

I am putting together a sort of "training/practice environment" where I can spawn enemy aircraft groups in via the F10 menu. This in itself is not difficult but I wanted to try something a little different. To give you a hypothetical. The F10 menu might have a entry for "fighters" and when you hit that, it then selects one out of five different possible groups to spawn randomly. Is there a way to do this without getting into scripting and just using flags/triggers in the editor? If not, I have no real knowledge of how to do such a thing via scripts so if that is the only option, I would really need to know where I should start on that.

I suppose the big issue here is that I can figure out how to get the F10 menu options to select randomly from a set of possible groups but I can't really figure out how to remove the group that spawned from the pool of possible groups when the player hits that button in the F10 menu again.
statrekmike is offline   Reply With Quote
Old 02-12-2019, 03:43 AM   #2
feefifofum
3rd Party Developer
 
feefifofum's Avatar
 
Join Date: Jan 2015
Location: USA
Posts: 2,854
Default

First set up a radio item, on flag 1, to spawn a fighter. When flag 1 is activated by the player, set another flag to a random value

3 SWITCHED CONDITION (player activates radio item on flag 1, NO EVENT)
===
FLAG IS TRUE (1)
===
SET FLAG RANDOM VALUE (10,1,5)

Each value corresponds to a group like so-


3 SWITCHED CONDITION (activate fighter group 1, NO EVENT)
===
FLAG EQUALS (10, 1)
FLAG IS FALSE (101)
===
GROUP ACTIVATE (fighter group 1)
FLAG OFF (10)
FLAG ON (101)


Then a check to see if the group has already spawned and re-roll the RNG if so

3 SWITCHED CONDITION (fighter group 1 already spawned)
=====
FLAG EQUALS (10, 1)
FLAG IS TRUE (101)
=====
FLAG OFF (10)
SET FLAG RANDOM VALUE (10, 1, 5)

Lastly, a trigger to remove the radio item once all five groups are activated

1 ONCE (fighters down, NO EVENT)
===
FLAG IS TRUE (101)
FLAG IS TRUE (102)
FLAG IS TRUE (103)
FLAG IS TRUE (104)
FLAG IS TRUE (105)
===
MESSAGE TO ALL ('All fighter groups have been spawned', 10)
RADIO ITEM REMOVE ('Activate fighters')

Last edited by feefifofum; 02-12-2019 at 04:40 PM.
feefifofum is offline   Reply With Quote
Old 02-12-2019, 07:46 AM   #3
statrekmike
Member
 
Join Date: Dec 2011
Location: Providence RI
Posts: 431
Default

Thanks so much!
statrekmike is offline   Reply With Quote
Old 02-12-2019, 04:40 PM   #4
feefifofum
3rd Party Developer
 
feefifofum's Avatar
 
Join Date: Jan 2015
Location: USA
Posts: 2,854
Default

Little mistake. We have to reset flag 10 prior to rerolling; otherwise, if the same number is generated twice, the switched condition will not activate because flag 10 didn't "switch" but remained the same. Fixed the pseudo trigger in the previous post.
feefifofum 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 09:28 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.