Join The Fan Lab, a private Fandom research community for users in the US and UK where you will be asked to share your opinions on all things gaming and entertainment! Click here to see if you qualify

UnitInVehicle

From Wowpedia
Jump to: navigation, search

Checks whether a specified unit is within an vehicle.

inVehicle = UnitInVehicle("target")

Arguments

unit
  • the Unit to check

Returns

inVehicle

  • boolean - trueif the specified unit is in a vehicle, false otherwise.

Example

 if UnitInVehicle("target") then
   SendChatMessage("My Target is in a vehicle.", "SAY");
 else
   SendChatMessage("My Target is not in a vehicle.", "SAY");
 end

Result

Says "My Target is in a vehicle." if the target is in a vehicle, "My Target is not in a vehicle." otherwise.