I'm sure you got the function in there somewhere. Let me check.
Edit: Yes,
This one is in CustomMissile
//: Thanks to The_Reborn_Devil
function GetZAngle takes real x1, real y1, real z1, real x2, real y2, real z2 returns real
return Atan2(z2 - z1, SquareRoot((x2-x1) * (x2-x1) + (y2-y1) * (y2-y1)))
endfunction
And this one is in CustomEffect
method operator zAngle= takes real value returns nothing
local integer i = R2I(value * bj_RADTODEG + 90.5)
set this.zAng = value
if i >= 180 then
set i = 179
elseif i < 0 then
set i = 0
endif
call SetUnitAnimationByIndex(this.effUnit, i)
endmethod
So, an example
CustomEffect example = some effect
set example.zAngle = GetZAngle(0, 0, 0, XVELO, YVELO, ZVELO)