Page 1 of 1

Addon that displays players in x radius around you

PostPosted: Mon Jan 04, 2016 3:46 pm
by Exaltera
Anyone has this? That shows a list of all the players that is for example in a 5 yard radius around you.

Thanks in advance.

Re: Addon that displays players in x radius around you

PostPosted: Mon Jan 04, 2016 4:03 pm
by Mimma
Range detection in Vanilla does not work with the exceptions of a few API based ranges, for example spell range (usually 30 yards) or visible range (100 yards).

The C'Thun Warner addon (http://armory.digam.dk/?sa=download.fil ... p1=8&p2=45) works using the trade range (11 yards), but it is not possible to alter this range to e.g. 5 yards.
I believe accurate range check was added in TBC, although I am not 100% sure about that.

There are some 3rd party libraries available which estimate the range, but they are also not accurate.

Re: Addon that displays players in x radius around you

PostPosted: Mon Jan 04, 2016 4:11 pm
by Renew
you can measure range outside a dungeon (on flat ground), it works pretty well...check out my addon-test video (data in yrd every frame):

https://www.youtube.com/watch?v=0pmev1ALN34

inside a dungeon you can messure distance with the normal API: http://wowwiki.wikia.com/wiki/API_CheckInteractDistance

Code: Select all
1 = Inspect, 28 yards
2 = Trade, 11.11 yards
3 = Duel, 9.9 yards
4 = Follow, 28 yards


this works perfectly

and over http://wowwiki.wikia.com/wiki/API_IsSpellInRange

you can check 40yrd range over 40yrd healing spells - you cant use this OnUpdate thou, my addon goes down to 1 refresh per sec. without killing performance :)

Re: Addon that displays players in x radius around you

PostPosted: Mon Jan 04, 2016 4:12 pm
by Mimma
Those are exactly what I mean, Renew ;-)

Re: Addon that displays players in x radius around you

PostPosted: Mon Jan 04, 2016 4:21 pm
by Dreez
Renew wrote:you can measure range outside a dungeon (on flat ground), it works pretty well...check out my addon-test video (data in yrd every frame):

https://www.youtube.com/watch?v=0pmev1ALN34

really interested in how you did that, any chance you can give me a link to the code or a brief explanation (what API was used mostly)

Re: Addon that displays players in x radius around you

PostPosted: Mon Jan 04, 2016 4:22 pm
by Mimma
Wild guess: Pythagoras theorem ;-)

Re: Addon that displays players in x radius around you

PostPosted: Mon Jan 04, 2016 4:26 pm
by Renew
Dreez wrote:
Renew wrote:you can measure range outside a dungeon (on flat ground), it works pretty well...check out my addon-test video (data in yrd every frame):

https://www.youtube.com/watch?v=0pmev1ALN34

really interested in how you did that, any chance you can give me a link to the code or a brief explanation (what API was used mostly)


you can read out the map position of group/raidmembers and calculate the distance over your own position :)
the calibration has to be done by the normal 28yrd API range once :)
sraidframes improved use this too...

Code: Select all
GetPlayerMapPosition(UnitID)
get map position over the UnitID
Code: Select all
VHM.distance = sqrt((px - ux)^2 + (py - uy)^2)*1000
u=raidmember, p=player

edit: what mimma said :)

Re: Addon that displays players in x radius around you

PostPosted: Mon Jan 04, 2016 4:37 pm
by Dreez
didn't think of using the map position, thanks^^

Re: Addon that displays players in x radius around you

PostPosted: Wed Jan 06, 2016 7:25 pm
by crimsonsage
Any way to turn that feature into something that draws a circle of "X" yards around you? Would be cool to have like an 8 yard circle around you as a hunter.

Re: Addon that displays players in x radius around you

PostPosted: Wed Jan 06, 2016 8:41 pm
by Renew
crimsonsage wrote:Any way to turn that feature into something that draws a circle of "X" yards around you? Would be cool to have like an 8 yard circle around you as a hunter.


This is not possible :/