WoW:API GetCurrentPosition: Difference between revisions
Jump to navigation
Jump to search
m ({{wowapi}}) |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{wowapi | {{wowapi|removed=1.3.0|replace=Replaced by {{api|GetPlayerMapPosition}}}} | ||
Returns the position of a unit relative to the world. | |||
local loc = GetCurrentPosition("unit") | |||
== Parameters == | |||
=== Returns === | |||
* locY (number) - Y value of the player's position. | |||
* locX (number) - X value of the player's position. | |||
* locZ (number) - Z value of the player's position (0 is sea level). | |||
== Example == | |||
local locX, locY, locZ = GetCurrentPosition("player"); | local locX, locY, locZ = GetCurrentPosition("player"); | ||
DEFAULT_CHAT_FRAME:AddMessage(locX .. ", " .. locY .. ", " .. locZ); | DEFAULT_CHAT_FRAME:AddMessage(locX .. ", " .. locY .. ", " .. locZ); | ||
; | ;Result | ||
1773.85, 63.06, -46.32 | 1773.85, 63.06, -46.32 | ||
== Notes == | |||
* Removed in patch 1.3.0. Use the more specific {{api|GetPlayerMapPosition}} instead. |
Revision as of 21:37, 12 February 2021
This is no longer a part of the World of Warcraft API.
|
← WoW API < GetCurrentPosition
Returns the position of a unit relative to the world.
local loc = GetCurrentPosition("unit")
Parameters
Returns
- locY (number) - Y value of the player's position.
- locX (number) - X value of the player's position.
- locZ (number) - Z value of the player's position (0 is sea level).
Example
local locX, locY, locZ = GetCurrentPosition("player"); DEFAULT_CHAT_FRAME:AddMessage(locX .. ", " .. locY .. ", " .. locZ);
- Result
1773.85, 63.06, -46.32
Notes
- Removed in patch 1.3.0. Use the more specific GetPlayerMapPosition instead.