globals
//counts the steps
integer i
//x,y of start position
real xStart
real yStart
//x,y of each step
real xD
real yD
//the dummy
unit dummyUnit
endglobals
function move takes nothing returns nothing
if i < 100 then
set i = i + 1
call SetUnitX(dummyUnit, xStart + xD * i)
call SetUnitY(dummyUnit, yStart + yD * i)
else
call DestroyTimer(GetExpiredTimer())
endif
endfunction
function shockwave real x, real y, real angle returns nothing
set i = 0
set xStart = x
set yStart = y
set xD = cos(angle)
set yD = sin(angle)
call TimerStart(CreateTimer(), true, 0.03, function move)
endfunction