Rejn 0 Posted April 8, 2007 I saw a topic on this a while ago but can't seem to find it. If you know the search key could u let me know or point me in the topic thanks. im trying to make a condition that when a % or number of the TOTAL friendly units in the trigger area or in general are left alive (doesnt matter whichever is simpler). Could someone help me out? This would then trigger my retreat.sqs Any assistance is appreciated thankyou. Share this post Link to post Share on other sites
shuko 59 Posted April 8, 2007 Couldnt find it either and cant remember how it was done there, but one way is to have 2 triggers. First one fires once and takes a count for all the friendly units. In the onAct line do: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">totalFriendly = count thislist This isnt needed if you know/can get the total count some other way (for example only the player group is in there, then you can just count the group etc). Second is same size but repeat. On cond line do: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">({alive _x} count thislist) < (0.5 * totalFriendly) The 0.5 is 50%, which you can change of course. Share this post Link to post Share on other sites