OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: gadolinite on 24 May 2004, 00:43:08

Title: group in chopper
Post by: gadolinite on 24 May 2004, 00:43:08
How do you check whether all live units in a group are in a vehicle?
Title: Re:group in chopper
Post by: Dubieman on 24 May 2004, 02:51:14
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 ::)
Title: Re:group in chopper
Post by: nEO iNC on 24 May 2004, 08:36:57
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
Title: Re:group in chopper
Post by: h- on 24 May 2004, 11:00:43
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..
Title: Re:group in chopper
Post by: gadolinite on 25 May 2004, 01:03:00
thanks guys