level 10
开水专烫鸡
楼主
library ReDan
globals
private boolean array B
private timer array Timer
private unit array U
endglobals
private function Off takes nothing returns nothing
local integer i=0
loop
set i=i+1
--------------------为什么下面这个判断不行求解-------------------------
if Timer[i]==GetExpiredTimer() then
set B[i]=FALSE
call SetUnitLifePercentBJ(udg_weapon[i],100)
endif
exitwhen i>10
endloop
call DestroyTimer(GetExpiredTimer())
endfunction
function ReDan takes unit u returns nothing
local integer i=GetPlayerId(GetOwningPlayer(u))
if B[i]==FALSE then
set Timer[i]=CreateTimer()
set U[i]=u
set B[i]=TRUE
call TimerStart(Timer[i],GetUnitPointValue(u),FALSE,function Off)
endif
endfunction
endlibrary
2013年07月04日 02点07分
1
globals
private boolean array B
private timer array Timer
private unit array U
endglobals
private function Off takes nothing returns nothing
local integer i=0
loop
set i=i+1
--------------------为什么下面这个判断不行求解-------------------------
if Timer[i]==GetExpiredTimer() then
set B[i]=FALSE
call SetUnitLifePercentBJ(udg_weapon[i],100)
endif
exitwhen i>10
endloop
call DestroyTimer(GetExpiredTimer())
endfunction
function ReDan takes unit u returns nothing
local integer i=GetPlayerId(GetOwningPlayer(u))
if B[i]==FALSE then
set Timer[i]=CreateTimer()
set U[i]=u
set B[i]=TRUE
call TimerStart(Timer[i],GetUnitPointValue(u),FALSE,function Off)
endif
endfunction
endlibrary