WoWInterface (
-   Lua/XML Help (
-   -   Direction and distance to enemy (

doofus 03-29-19 01:46 AM

Direction and distance to enemy
I have asked this some time ago and was told there is no way but I am trying my luck once more.

Blizzard have lately implemented a "/cast [@cursor] Spell" and "/cast [@player] Spell". However they have not implemented a "/cast [@target] Spell".

If you are a Mage for example you can call out Blizzard in one key press using the macro "/cast [@cursor] Blizzard", assuming you are pointing at somewhere sensible when you press the button. And if you want to play like an Arcane Mage (into the fray), you could also do "/cast [@player] Flamestrike".

But is there a (ingenious) way for an addon to determine the direction / distance of a targeted enemy ? I was thinking if you cast a slow moving spell and check the time taken from successful cast to actual hit, that might give you an indication of distance? I am all out of ideas. And how would direction be relayed in an addon, are there any functions conferring directional information?

Seerah 03-29-19 06:44 PM

You can only estimate range by checking to see if other spells/abilities with a different distance are in range.

Blizzard does not want an addon to know what direction a target is in. There used to be one addon that calculated this, but they intentionally broke it.

You cannot cast spells with a targeting ring automatically at your target because Blizzard wants you to actively choose where this spell goes. You choose where your cursor is. You choose where your character is. You do not choose where your target is.

doofus 04-04-19 03:11 PM

OK thanks!

Taudier 04-05-19 08:56 AM

The nameplates can change their alpha and scale according to the distance with the player. Retreive one of them and you get a function of the distance.
For direction, probably by the minimap.

"/cast [@target] Spell" is more convenient and would be enough in some case, so you must have 2 actions. i think they didn't implemented it because aiming is a part of the gameplay.

All times are GMT -6. The time now is 01:27 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2019 MMOUI