OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 456820 on 06 Aug 2006, 23:06:02
-
How can i check wether every single west soldier on a map is in the back seat of a Blackhawk named chop1
Note - All west soldiers are in more then just one group.
Cheers.
-
first thing, you need to create a list of all west units
2 methods
1) Place a repeating, activated by anybody trigger encompassing the entire map
and from this trigger retuirn a list of all west units
See following thread << http://www.ofpec.com/forum/index.php?topic=27814.0 >>
or
2) if there are only a few units, create an array of all the west units
eg
_Warray = [W1,W2,W3,W4]
and then use following condition
{if ((count _x in _veh) ==(count _x))then{do whatewver you want here}}foreach _wunits
code untested should work
-
I would use group names rather than an array of unit names because if a unit dies after you've created the unit array they cannot satisfy the condition.
"_x in chop1" count (UNITS group1 + UNITS group2) == count (UNITS group1 + UNITS group2)
If you've got loads of groups i'd use a trigger -
Activation -West/Present
Condition - "_x in chop1" count thislist == count thislist
EDIT - Would the chopper be counted as a seperate unit in the in the trigger?
-
Thanks alot gonna test.