|
我想用TimerStart()来实现等待,但是不理我,我是这样写的。
function Trig_jishu_Conditions takes nothing returns boolean
if ( not ( udg_boolkanqiang[( GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) + 10 )] == 1 ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A004' ) ) then
return false
endif
return true
endfunction
function Trig_jishu_Func003C takes nothing returns boolean
if ( not ( udg_boolkanqiang[( GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) + 10 )] == 1 ) ) then
return false
endif
return true
endfunction
function justforwa takes nothing returns nothing
if ( Trig_jishu_Func003C() == true) then
call SetUnitTimeScalePercent( GetTriggerUnit(), 0.00 )
else
call DoNothing( )
endif
endfunction
function Trig_jishu_Actions takes nothing returns nothing
local timer t = CreateTimer()
call SetUnitTimeScalePercent( GetTriggerUnit(), 100 )
call TimerStart(t,0.01,false,function justforwa)
set t =null
endfunction
//===========================================================================
function InitTrig_jishu takes nothing returns nothing
set gg_trg_jishu = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_jishu, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_jishu, Condition( function Trig_jishu_Conditions ) )
call TriggerAddAction( gg_trg_jishu, function Trig_jishu_Actions )
endfunction |
|