UnitPosition
functionimplementedavailable in: camelot
Returns the position of a unit in the current world area.
function UnitPosition( unit: string): (number, number, number, number)Parameters
| name | type | description |
|---|---|---|
unit | string | The 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
| # | name | type | description |
|---|---|---|---|
| 1 | positionX | number | Y value of the unit's position in yards, relative to the instance |
| 2 | positionY | number | X value of the unit's position in yards, relative to the instance |
| 3 | positionZ | number | Always 0. A placeholder for the Z coordinate |
| 4 | mapID | number | InstanceID |
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 ↗.