- Joined
- Jun 7, 2008
- Messages
- 37
Tried making a sliding trigger and the result was pretty lol, can anybody see why?
JASS:
function Trig_Slide2_Actions takes nothing returns nothing
local real x1 = GetUnitX(udg_Pusher[2])
local real y1 = GetUnitY(udg_Pusher[2])
local real angle = GetUnitFacing(udg_Pusher[2])
call SetUnitX(udg_Pusher[2], x1 + udg_Spd[2] * Cos(angle))
call SetUnitY(udg_Pusher[2], y1 + udg_Spd[2] * Sin(angle))
endfunction
//===========================================================================
function InitTrig_Slide2 takes nothing returns nothing
set gg_trg_Slide2 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Slide2, 0.02 )
call TriggerAddAction( gg_trg_Slide2, function Trig_Slide2_Actions )
endfunction