WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Is there a way to know the distance to my target? (https://www.wowinterface.com/forums/showthread.php?t=2233)

Donjim 10-27-05 11:20 AM

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.

woofiest 10-27-05 11:51 AM

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.

svip 10-27-05 12:09 PM

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.


All times are GMT -6. The time now is 05:29 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI