Jump to content

Need some help with a specific F10 menu spawn dilemma.


statrekmike

Recommended Posts

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.

Link to comment
Share on other sites

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')


Edited by feefifofum
  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...
  • Recently Browsing   0 members

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