Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API GetCurrentPosition

Last wiki revision 2020-01-08

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).

local locX, locY, locZ = GetCurrentPosition("player"); DEFAULT_CHAT_FRAME:AddMessage(locX .. ", " .. locY .. ", " .. locZ);

  • Example

1773.85, 63.06, -46.32

  • Result

Source

https://warcraft.wiki.gg/wiki/API_GetCurrentPosition · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.