WoW:API GetPlayerMapPosition

From AddOn Studio
Revision as of 19:15, 22 November 2004 by WoWWiki>Meog
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
GetPlayerMapPosition -Documentation by Meog-

Returns the postion of a unit on the current map

GetPlayerMapPosition(who);

Arguments
String who
who
Specifies the object for which the position is returned, valid are:
"player": current player
"party1", "party2", "party3", "party4": one of your group members
"target": the current target - can't check, but does only work on friendly units, if ever
"anyPlayerName": of the player with that name - can't check, but does only work on friendly units, if ever

Returns
Number posX, Number posY
posX
x value of the player position (in percent, relative to WorldMapDetailFrame)
posY
y value of the player position (in percent, relative to WorldMapDetailFrame)

Example
local posX, posY = GetPlayerMapPosition();

Result
0.43320921063423, 0.69365233182907

Description

Returns the postion of the player (argument) on the current map. (Both values equal zero, when the player is not on the currently shown map.)


Template:WoW API