Description
Vehicle in which given unit is mounted. If none, unit is returned. Alternatively, use objectParent
Important
While vehicle may return the vehicle the unit is in for alive units, for dead units which are groupless, this command returns the unit itself - use objectParent instead.
Syntax
vehicle unitName
Parameters:
Returns: Object
Examples
Example 1
SQS
? vehicle player != player : hint "Player is in a vehicle"
Example 2
SQF
if (vehicle player != player) then { hint "Player is in a vehicle" };