v0.13.8

UnitPosition

functionimplementedavailable in: camelot

Returns the position of a unit in the current world area.

signaturewowlua
function UnitPosition(    unit: string): (number, number, number, number)

Parameters

nametypedescription
unitstringThe unit for which the position is returned. Does not work with all unit types. Works with "player", "party''N''" or "raid''N''" as unit type. In particular, it does not work on pets or any unit not in your group.

Returns

#nametypedescription
1positionXnumberY value of the unit's position in yards, relative to the instance
2positionYnumberX value of the unit's position in yards, relative to the instance
3positionZnumberAlways 0. A placeholder for the Z coordinate
4mapIDnumberInstanceID

In wowlua's emulated client

implementedwowlua models the system behind it. 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 ↗.