OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: bedges on 22 Apr 2005, 08:18:57
-
scenario - i have a patrol group of about 12 loons. once they're dealt with i want some text to appear. i could do this with a script no problem, but i was wondering if there's a one-line piece of code which i could put in the condition field of a trigger to check the whole group, without having to resort to a separate script.
foreach doesn't seem to work, that or i'm getting the brackets wrong.
any ideas?
-
Why don't you use a simple "east/west... not present" trigger?
Or name the group (eg : egrp = group this)
and in the condition of the trigger :
"alive _x" count units egrp == 0
-
i thought you dont use " " i use { } around alive _x instead
like this
{alive _x} count units egrp == 0
-
Both will work.
-
that's what i was after - i could have done the trigger thing, but the patrol moves, so i'd need either a huge trigger, or one that moved with the group - but the
{alive _x} count units grp_name == 0
seems the very thing - cheers indeed. :)