ClosestUnitPosition

From Warcraft Wiki
Jump to navigation Jump to search

Returns the unit position of the closest creature by ID. Only works for mobs in the starting zones.

xPos, yPos, distance = ClosestUnitPosition(creatureID)

Arguments

creatureID
number - NPC ID of a GUID of a creature.

Returns

xPos
number
yPos
number
distance
number - Relative distance in yards.

Patch changes

Battle for Azeroth Patch 8.0.1 (2018-07-17): Added.