OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: gadolinite on 24 May 2004, 00:43:08
-
How do you check whether all live units in a group are in a vehicle?
-
Maybe a script that has a question or something of the like...
_group = _this select 0
#inside
?(group in chopper) goto "IN"
#IN
hint "Units are on the chopper, good luck."
exit
Something to that effect. I haven't scripted in monthes so the syntax definitely not garunteed so someone should fix this. :P ::)
-
Hey guys, you could do something like this in a script if you're using waypoints;
_heli = _this select 0
_grp = _this select 1
_heli land "get in"
_heli lockwp true
#wait
_helicount = count (crew _heli)
_groupcount = count (units group _grp)
~1
?_helicount != (_groupcount + 2) : goto "wait"
_heli lockwp false
exit
-
No need for scripts...
You just make a trigger with condition:
"_x in vehicleName" count (units group player) == count (units group player)
And on activation what you need...
That would of course check only the players group, but the same syntax applies to other units as well..
-
thanks guys