Jump to content
Sign in to follow this  
Javito1986

Groups and End Triggers

Recommended Posts

Here's the deal. I have five attacking groups of infantry, all set to allowfleeing 0 so that they do not run off. When they're all killed I want the mission to end about a minute later. And I cannot just set an end trigger for "When East Not Present" because there are enemy tanks in the area who might still be there after the infantry die, but I want the mission to end -specifically- when those five groups die.

Also, I'd like to add a message saying something like "Got him!" when an enemy vehicle is destroyed. How can I do this? I remember you could set a condition in a trigger for "notalive" or something similar but I don't remember the command exactly.

Any help would be greatly appreciated. smile_o.gif

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"alive _x" count units group1 == 0 AND "alive _x" count units group2 == 0 AND "alive _x" count units group3 == 0 AND "alive _x" count units group4 == 0 AND "alive _x" count units group5 == 0

condition: !(alive mytank)

on activ: hint "I got the tank"

or

condition: "alive _x" count [tank1,tank2,tank3...] == 0

on activ: hint "All the armor is down!"

Share this post


Link to post
Share on other sites

You can also group triggers with actual unit groups. This allows you to choose different options within the trigger other than "East" as a whole. In this situation though, I would use the above option because it involves a few groups. I just wanted to mention the alternative because it might help you in the future!

[EDIT] you can simplify the above also:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> "alive _x" count (units group1 + units group2 + units group3 etc...) == 0[/EDIT]

Share this post


Link to post
Share on other sites
Quote[/b] ] "alive _x" count (units group1 + units group2 + units group3 etc...) == 0

Cool smile_o.gif

I tried that but couldn't get the right syntax; I was using brackets [...]

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×