Jump to content

Logic for disabling a condition before it comes true


Recommended Posts

Posted

I have a mission with three victory conditions based on survival of ground units being CAS-ed by the player. The problem is that some combat can still be occurring after the trigger to evaluate the player's performance fires, thus, he can be informed he's earned a "Victory" (All objectives taken and > 80% of the vehicles intact), only to receive another message as he RTBs that he's won a "Minor Victory" (All objectives taken and > 50% of the vehicles intact). Since I have to draw the line somewhere -- i.e. the point at which all objectives are taken -- and because I cannot control a few subsequent skirmishes (short of enforcing a ceasefire, which would be interesting, come to think of it, anyone know how, can I put everyone on ROE>Weapons Hold by trigger...?) my question is: How can I make sure that, when one victory message shows as true, the others do not pop up subsequently, even when they come true? I think there's probably a Flag # increase/decrease mechanism for this but I cannot remember exactly what.

 

Thanks!

Posted (edited)

I can't remember but can't you set a flag with each victory condition? That way if you have three messages, you can set the conditions to the victory condition being met and the other two flags must be false.

 

That way if you get one victory message, that flag will be true- therefore the other victory conditions couldn't be met.

 

I'm typing this on my iPhone so it may be a bit confusing. I can elabourate if necessary when I get to my comp.

 

 

Possible?

Edited by ENO

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Posted

Once> Major Victory Message Requirements AND Flag x False> Set Flag X and message

Once> Minor Victory Message Requirements AND Flag x False> Set Flag X and message

Once> Very Minor Victory Message Requirements AND Flag x False> Set Flag X And message

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

As ENO said, use triggers.

 

Apart from that, you could deactivate all the groups to stop them from firing. This would clean the map. If you dont want the units to disappear, you can disable their AI. Or you can fire a triggered action on all the groups with ROE > Weapons hold.

[sIGPIC][/sIGPIC]

Posted

Thanks, guys. Grimes, is Flag X the same value across all three conditions? Or is it Flag X, Flag Y and Flag Z? I tried to think it through but gave myself a headache.

Posted

Its the same flag. Its basically the same thing as this: http://en.wiki.eagle.ru/wiki/Mission_Editor:_Randomization#Single_Choice_from_List

 

But without the randomization.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • Recently Browsing   0 members

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