WoW:API GetPlayerMapPosition
Jump to navigation
Jump to search
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.)