WoW:API GetCurrentPosition: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(use removedapi template)
m ({{wowapi}})
Line 1: Line 1:
{{removedapi|1.3.0|It was replaced by [[API_GetPlayerMapPosition|GetPlayerMapPosition]]}}
{{wowapi}}
 
{{removedapi|1.3.0|Replaced by [[API_GetPlayerMapPosition|GetPlayerMapPosition]]}}
<center>'''GetCurrentPosition''' ''-Documentation by [[user:Pilum|Pilum]]-''</center>
 
Returns the postion of a unit relative to the world.
Returns the postion of a unit relative to the world.


Line 17: Line 15:
----
----
;''Example''
;''Example''
  local loc = GetCurrentPosition("player");
  local locX, locY, locZ = GetCurrentPosition("player");
   
  DEFAULT_CHAT_FRAME:AddMessage(locX .. ", " .. locY .. ", " .. locZ);


;''Result''
;''Result''
1773.85, 63.06, -46.32
1773.85, 63.06, -46.32
----
{{WoW API}}

Revision as of 14:41, 18 June 2006

WoW API < GetCurrentPosition

Returns the postion of a unit relative to the world.

loc = GetCurrentPosition("unit");

Returns
locY, locX, locZ as one string.
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