OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Surdus Priest on 01 Oct 2007, 14:55:37

Title: condition when all units in a trigger die
Post by: Surdus Priest on 01 Oct 2007, 14:55:37
i set a trigger collecting units in a variable,  but now i need a condition for when all those units are dead

i've tried {not alive _x) foreach variable

but i dont think that works in conditions

i need this cos i also have to exclude certain units from the list, otherwise i'd just use a not present trigger
Title: Re: condition when all units in a trigger die
Post by: Mandoble on 01 Oct 2007, 15:11:11
I assume your variable is an array with all the units present at time "T" in a trigger's area.

Code: [Select]
? {alive _x} count variable == 0: hint "all are dead"
Title: Re: condition when all units in a trigger die
Post by: Surdus Priest on 01 Oct 2007, 15:21:42
star :D