Lore archive · Warcraft Wiki, 2023 dump
API GetBattlefieldPosition
Last wiki revision 2020-01-08
Retrieves the location and name of a player in the battleground that is not in the same party or raid as you. posX, posY, name = GetBattlefieldPosition(index)
- index : Number - Index of the player to retrieve information for.
- posX : Number - X value of the player's position (Range from 0 to 1, relative to WorldMapDetailFrame)
- posY : Number - Y value of the player's position (Range from 0 to 1, relative to WorldMapDetailFrame)
- name : String - Name of the player
How to get the location of a player in the same party or raid group.
if( GetNumRaidMembers > 0 ) then for i=1, MAX_RAID_MEMBERS do local posX, posY = GetPlayerMapPosition( "raid" .. i ); if( posX ~= 0 and posY ~= nil ) then local playerName = UnitName( "raid" .. i ); end end else for i=1, MAX_PARTY_MEMBERS do local posX, posY = GetPlayerMapPosition( "party" .. i ); if( posX ~= 0 and posY ~= 0 ) then local playerName = UnitName( "party" .. i ); end end end
Source
https://warcraft.wiki.gg/wiki/API_GetBattlefieldPosition · 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.