HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spell targetted point

02-15-2007, 01:16 AM#1
Joker
Is there any native that i can use for that? I tried GetSpellTargetLoc() and GetOrderPointX/Y. Btw, im using channel and have unit or point target for target type
02-15-2007, 02:22 AM#2
Pyrogasm
Did you try any of these?
Collapse JASS:
call GetUnitX(GetSpellTargetUnit())
call GetUnitY(GetSpellTargetUnit())
call GetUnitLoc(GetSpellTargetUnit())

For further reference, here is a link to a searchable Natives (and Blizz functions) database.
02-16-2007, 12:29 AM#3
shadow1500
If you target a unit then those natives won't work, here's how to do it:
Collapse JASS:
local unit u = GetSpellTargetUnit()
local location l = GetSpellTargetLoc()
local real x
local real y
if l!=null then
    set x = GetLocationX(l)
    set y = GetLocationY(l)
    call RemoveLocation(l)
    set l = null
else
    set x = GetUnitX(u)
    set y = GetUnitY(u)
    set u = null
endif