OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: MetalG on 06 Apr 2005, 17:55:17
-
Heya,
I would like to know what the command is to check for a unit being in the cargo of a vehicle, in this case, a helicopter. Basically I need a trigger check if the unit is in the helicopter, if it is, end the mission.
-
There are several ways to do this :
To check a unit is in a vehicle (general)
unitname != vehicle unitname
To check a unit is in a vehicle (specific, in this case car1)
unitname in car1
To check the unit is the driver :
driver car1 == unitname
To check the unit is the gunner :
gunner tank1 == unitname
To check the unit is the commander
commander tank1 == unitname
Use it in the condition field of a trigger
-
alternatively, you could use a 'get in' event handler on the chopper in question...
from igor drukov's tutorial -
"getin" and "getout" (to vehicles only) :
_this select 0 : the vehicle the EH is attached to ;
_this select 1 : in/from what position (driver, gunner, commander, cargo) ;
_this select 2 : who's just got in/out ;
just in case you want to be specific about the player being in cargo, and not just in the chopper willy nilly.
heheh. i said 'willy nilly' :) archaic language is such fun.
-
Blanco, Bedges, thanks for your help.
I got it to work with 'unitname in vehiclename', so I didn't try your approach out yet bedges. Thanks again!