Thread Tools Display Modes
04-12-13, 09:40 AM   #1
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Enemy Player Coordinates

I need a method to get the current flag carrier coordinates in WSG and TP, i dont need it all the time only when a specified "CHAT_MSG_BG_SYSTEM_ALLIANCE" or "CHAT_MSG_BG_SYSTEM_HORDE" event occours. I'm not sure the "GetPlayerMapPosition()" works on enemy players too or not.
If anyone who has a good idea for such a function (or know such a function) i would appreciate it.
  Reply With Quote
04-12-13, 10:17 AM   #2
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
I don't believe you can get this information from the API. It would make stealthing and other such mechanics obsolete.
  Reply With Quote
04-12-13, 10:25 AM   #3
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
The coordinates of the flag carrier are available, they put an icon for them on the map.

The function is GetBattlefieldFlagPosition, and you call it on an index between 1 and GetNumBattlefieldFlagPositions().

It returns x, y and part of the texture path of the flag.

Last edited by semlar : 04-12-13 at 10:27 AM.
  Reply With Quote
04-12-13, 11:54 AM   #4
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by semlar View Post
The coordinates of the flag carrier are available, they put an icon for them on the map.

The function is GetBattlefieldFlagPosition, and you call it on an index between 1 and GetNumBattlefieldFlagPositions().

It returns x, y and part of the texture path of the flag.
Awsum thanks, tho i dont get it why is it got like 10 decimal precision.
  Reply With Quote
04-12-13, 12:41 PM   #5
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by Resike View Post
Awsum thanks, tho i dont get it why is it got like 10 decimal precision.
They're limited to 10 decimals due to the type of variable used to store the information. Otherwise they could go higher, then my addon to calculate the quantum state of player's would be possible
  Reply With Quote
04-12-13, 01:31 PM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Originally Posted by myrroddin View Post
I don't believe you can get this information from the API. It would make stealthing and other such mechanics obsolete.
These mechanics make the player drop the flag anyway last I checked.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
04-12-13, 01:33 PM   #7
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
Originally Posted by SDPhantom View Post
These mechanics make the player drop the flag anyway last I checked.
I never PvP, so had no idea.
  Reply With Quote
04-12-13, 01:47 PM   #8
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Anyway i was making a custom event with custom PlaySoundFile when you killed an enemy flag carrier in their flag room while your team didn't picked up the enemy flag, called "LastSecondSave". And i think i succeeded.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Enemy Player Coordinates


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off