How to get spell target x/y ?

Saldu

New Member
Reaction score
1
Hi

For units, I can use GetUnitY() and GetUnitX(), however, for spells I am only able to find GetSpellTargetLoc(), on which I could then use GetLocationX(), and GetLocationY(), but I wonder if there might be an easier way which I overlooked.

Greetings
Saldu
 

jwallstone

New Member
Reaction score
33
You can't. That's always been one of the biggest annoyances for a lot of people. You have to do it the way you described.

EDIT: Actually, I forgot that the upcoming patch (1.24) will have GetSpellTargetX and GetSpellTargetY. If you don't want to wait, you can connect to the Westfall server.
 

Rainther

I guess I should write something of value here...
Reaction score
61
Make a function of it perhaps?

Dono if that's what you're looking for, but it'd be the current simplies way I think.

JASS:
function X takes loc returns real
return GetLocationX(loc)
endfunction

function Y takes loc returns real
return GetLocationY(loc)
endfunction
 

RaiJin

New Member
Reaction score
40
Make a function of it perhaps?

Dono if that's what you're looking for, but it'd be the current simplies way I think.

GetLocationX(GetSpellTargetLoc())
GetLocationY(GetSpellTargetLoc())

o.o that sounds about right
 

Rainther

I guess I should write something of value here...
Reaction score
61
Reread the first post after I posted and edited mine. Were too lazy to read it fully the first time :p
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top