I have a piece of code that emjir3 gave me.
(I think hes on this forum)
I'm not sure if i'm useing it right.
The variables angle, Caster and Target have been set. Let me know if you want the whole trigger, though I think this is enough.
(I think hes on this forum)
I'm not sure if i'm useing it right.
JASS:
function ABU takes unit a, unit b returns real
return bj_RADTODEG * Atan2(GetUnitY( b ) - GetUnitY( a ) , GetUnitX( b ) - GetUnitX( a ) )
endfunction
//The below if part of the actions
set angle = ABU(Caster, Target)
call SetUnitFacing( Caster, angle )
The variables angle, Caster and Target have been set. Let me know if you want the whole trigger, though I think this is enough.