Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!

API UnitInRange

From Wowpedia
Jump to: navigation, search

Returns whether a unit is close to the player.

local inRange, checkedRange = UnitInRange("unit")


String (unitId) - unit to query; information is only available for members of the player's group.


Boolean - true if the unit is within ~40 yards of the player, false otherwise
Boolean - true if a range check was actually performed; false if the information about distance to the queried unit is unavailable.

Patch history

Mists of Pandaria Patch 5.0.4 (2012-08-28): Added checkedRange return value.