|
哦……其实偶在说这个AI脚本中用来记录时间的变量一直不增加- -bbb
脚本本身貌似没有语法错误呢,为什么会这样呢?【呆呆】
Help~~~~
[codes=jass]
globals //声明全局变量
integer udg_Time2 = 0
endglobals
//时间处理
function wtime takes nothing returns nothing
set udg_Time2 = udg_Time2 + 1
endfunction
//计时开始
function timing takes nothing returns nothing
local timer t = CreateTimer()
call TimerStart(t,1,true,function wtime)
endfunction
//=======================================================================================
//主要部分
//=======================================================================================
function main takes nothing returns nothing
call Sleep( 5.0 )
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1,"Hallo World")
call timing()
loop
if udg_Time2 > 20 then
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1,"Hallo World")
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1,"Over")
endif
call Sleep( 1.0 )
endloop
endfunction
[/codes] |
|