|
勉強做了個刷兵的jass,但是不會在T中調用,
第1個CreateUints直接調用就行了,但是下面那段事件又如何調用?
我的本意是做一個刷兵模板,想刷什麽兵,什麽時候刷出來,直接在T中調用CreateUnits和ShuaBing
這兩個函數然後傳遞些值就可以用了.
[trigger]
function CreateUnits takes player P,integer Uid,location point,integer angel,location targetpoint,integer num returns nothing
local unit u
local integer i
loop
set i=i+1
exitwhen i>num
set u=CreateUnitAtLoc(P,Uid,point,angel)
call IssuePointOrderLoc( GetLastCreatedUnit(), "patrol", targetpoint )
set u=null
endloop
call RemoveLocation( point )
call RemoveLocation( targetpoint )
endfunction
//===========================================================================
function ShuaBing takes integer Ctimes returns nothing
local timer tm=CreateTimer()
call TimerStart(tm,Ctimes,true,function CreateUnits)
set tm=null
endfunction
[/trigger]
還是說,一定要是純文本格式才能使用下面這段? |
|