ClosestUnitPosition
functionguessedavailable in: camelot
Returns the unit position of the closest creature by ID. Only works for mobs in the starting zones.
function ClosestUnitPosition( creatureID: number): (number?, number?, number?)Parameters
| name | type | description |
|---|---|---|
creatureID | number | NPC ID of a GUID of a creature. |
Returns
| # | name | type | description |
|---|---|---|---|
| 1 | xPos | number? | |
| 2 | yPos | number? | |
| 3 | distance | number? | Relative distance in yards. |
Blizzard's documentation says it may return nothing.
In wowlua's emulated client
guessedThe answer is worked out from Blizzard's documentation, its UI code and the function's name, and not checked against the client. what the statuses mean
Restrictions
sources
Signature and flags: Blizzard's API documentation (Blizzard_APIDocumentationGenerated) (Unit system, camelot 1.60.1). Description: warcraft.wiki.gg's API pages ↗, by its contributors, CC BY-SA 4.0 ↗.