- Joined
- Sep 26, 2009
- Messages
- 9,534
Does this syntax?
JASS:
function superman takes unit u returns nothing
call SetUnitX( u , GetUnitX( u ) + 1 )
call SetUnitY( u , GetUnitY( u ) - 1 )
endfunction
function go takes nothing returns nothing
local unit u = CreateUnit( Player(0) , 'hfoo' , 0,0 )
local filterfunc f = superman(u)
local timer t = CreateTimer()
call TimerStart( t , 0.02 , true , f )
set t = null
set u = null
set f = null
endfunction
function InitTrig takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterPlayerEvent( t , Player(0) , EVENT_PLAYER_END_CINEMATIC )
call TriggerAddAction( t , function go )
set t = null
endfunction