|
function attackpertwosecondok takes nothing returns nothing//这个就是单位组命令了,我命令玩家12的所有单位每5秒攻击主城
call IssueTargetOrder(GetEnumUnit(),"attack",udg_company,udg_company)//可是为啥??路上就跑跑停停的,貌似每隔五秒听一次
endfunction
function attackpertwosecond takes nothing returns nothing
call ForGroup(GetUnitsOfPlayerAll(Player(11)),function attackpertwosecondok)
endfunction
function Trig_attackevery5second_Actions takes nothing returns nothing
local timer tm=CreateTimer()
call TimerStart(tm,15,true,function attackpertwosecond)
endfunction
//===========================================================================
function InitTrig_attackevery5second takes nothing returns nothing
set gg_trg_attackevery5second = CreateTrigger( )
call TriggerRegisterTimerEvent(gg_trg_attackevery5second,1,false)
call TriggerAddCondition( gg_trg_attackevery5second, Condition(function Trig_attackevery5second_Actions ))
endfunction |
|