Returns whether a unit is using a vehicle. Unlike similar functions, UnitUsingVehicle()
also returns true
while the unit is transitioning between seats in a vehicle.
See also Unit functions, Vehicle functions.
Signature:
usingVehicle
=
UnitUsingVehicle("unit")
Arguments:
unit
- A unit to query (string
, unitID)
Returns:
usingVehicle
-1
if the unit is using a vehicle; otherwisenil
(1nil
)