Thread Tools Display Modes
10-27-05, 11:20 AM   #1
Donjim
A Kobold Labourer
Join Date: Oct 2005
Posts: 1
Is there a way to know the distance to my target?

Hello guys,
I've came across your forum searching for an answer to my question: Is there like, a variable that stores the distance to my target, in yards?

Being a new modder, I've set my goal at making a mod that tells you the specific distance to your target, and I can't seem to find the exact way. I've searched wowwiki, but all I've found there are functions to target stuff, but not one to retrieve the exact distance.

Thx a lot for your time and effort.
  Reply With Quote
10-27-05, 11:51 AM   #2
woofiest
A Flamescale Wyrmkin
 
woofiest's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 95
not a modder myself, I'm just a mod-user.

but as far as I was told, this question got asked a lot and the answer is -NO-

but there's an API to check "is action in range" type of feature, and that's how some mod determine to make a hotbar button red or not red, to indicate you are in range or not.
__________________
Give me MY Warden Staff...

==== For Mod Hogger ======================================
http://www.wowinterface.com/
http://www.wowguru.com/ui
http://www.curse-gaming.com/
http://ui.worldofwar.net/
  Reply With Quote
10-27-05, 12:09 PM   #3
svip
A Murloc Raider
Join Date: Mar 2005
Posts: 6
It used to be possible to get the coordinates of the target and extrapolate the distance from that. This got removed due to obvious exploits and can only be done for raid/party members now.

It's still possible to check certain ranges. CheckInteractDistance() has 3 set ranges it can check whether the target is within - 5, 10 and 28 yards.

And as previous poster mentioned, it's possible to use IsActionInRange() with actions of different ranges to determine more.

However, exact distance is no longer possible (by design), unless someone thinks of some brilliant way to do it.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Is there a way to know the distance to my target?

Thread Tools
Display Modes

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