OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: RolsRois on 28 Dec 2008, 20:11:28

Title: A little help.. how to check if someone is in a vehicle as a condition
Post by: RolsRois on 28 Dec 2008, 20:11:28
if i have a unit, and i want the condition for a certain trigger to be if that specific unit is now inside a truck, whats the command?
cheerz
Title: Re: A little help.. how to check if someone is in a vehicle as a condition
Post by: zwobot on 28 Dec 2008, 21:22:27
in (http://community.bistudio.com/wiki/in_vehicle) - if you want to check if the unit is in a specific vehicle
vehicle (http://community.bistudio.com/wiki/vehicle) - if you want to check if it is in any vehicle (if it does not return the unit itsself the unit is not inside a vehicle)
Title: Re: A little help.. how to check if someone is in a vehicle as a condition
Post by: Raptorsaurus on 28 Dec 2008, 21:24:12
If you know the specific truck then you can do somthing like: unit in truck1 ; where unit is the name of the unit and truck1 is the name of the truck. If you do not know the variable name for the vehicle the unit is in then you can do: vehicle unit != unit ; where unit is the name of the unit.
Title: Re: A little help.. how to check if someone is in a vehicle as a condition
Post by: NightJay0044 on 05 Jan 2009, 06:43:54
Yes exactly. Say if you want to check to see if a soldier is inside a jeep..

Name the jeep: Jeep1
Name the soldier: Soldier1
(keep it simple)

Put this in the condition field of the trigger or waypoint of your desire.

Quote
Soldier1 in Jeep 1


This will check to see if this condition is true. :D

I think that's right.
Title: Re: A little help.. how to check if someone is in a vehicle as a condition
Post by: RolsRois on 06 Jan 2009, 10:53:42
Thanks guys worked pretty well/