I think using those PolarProjectionX and Y functions is really ugly 
Also, writing bj_DEGTORAD out by hand is kinda...
Anyways, assuming that that works, gj
Also, writing bj_DEGTORAD out by hand is kinda...
Anyways, assuming that that works, gj
function GetPolarOffset takes real maxDist, real n, integer count returns real
return 2*maxDist*(count-n-1)/(n-n*n)
endfunctionfunction PolarProjectionX takes real x, real distance, real angle returns real
return x+distance*Cos(angle * (3.14159/180.0))
endfunction
function PolarProjectionY takes real y, real distance, real angle returns real
return y+distance*Sin(angle * (3.14159/180.0))
endfunction
function GetPolarOffset takes real maxDist, real n, integer count returns real
return 2*maxDist*(count-n-1)/(n-n*n)
endfunction
function SlideUnit_Child takes nothing returns nothing
local timer t = GetExpiredTimer()
local unit u = GetHandleUnit(t, "unit")
local real ang = GetHandleReal(t, "angle")
local integer c = GetHandleInt(t, "counter")
local real offset = GetPolarOffset(GetHandleReal(t, "maxD"), GetHandleReal(t, "time")/0.01, c)
call SetUnitX(u, PolarProjectionX(GetUnitX(u), offset, ang))
call SetUnitY(u, PolarProjectionY(GetUnitY(u), offset, ang))
if c+1 > GetHandleReal(t, "time")/0.01 then
call FlushHandleLocals(t)
call DestroyTimer(t)
else
call SetHandleInt(t, "counter", c+1)
endif
set t = null
set u = null
endfunction
function SlideUnit takes unit whichUnit, real distance, real angle, real time returns nothing
local timer t = CreateTimer()
call SetHandleHandle(t, "unit", whichUnit)
call SetHandleReal(t, "angle", angle)
call SetHandleReal(t, "maxD", distance)
call SetHandleReal(t, "time", time)
call TimerStart(t, 0.01, true, function SlideUnit_Child)
set t = null
endfunction