function Test_Conditions takes nothing returns boolean
if GetIssuedOrderId()==OrderId("move") then
return true
endif
if GetOwningPlayer(gg_unit_hpea_0000)==Player(0) then
return true
endif
return false
endfunction
function Test_Do takes nothing returns nothing
local timer t=GetExpiredTimer()
call IssueImmediateOrder(gg_unit_hpea_0000,"stop")
call PauseTimer(t)
call DestroyTimer(t)
set t=null
endfunction
function Test_Actions takes nothing returns nothing
local timer t=CreateTimer()
call TimerStart(t,0.01, false,function Test_Do)
set t=null
endfunction
function InitTrig_Test takes nothing returns nothing
set gg_trg_Test=CreateTrigger()
call TriggerRegisterUnitEvent(gg_trg_Test,gg_unit_hpea_0000,EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerAddCondition(gg_trg_Test,Condition(function Test_Conditions))
call TriggerAddAction(gg_trg_Test,function Test_Actions)
endfunction