- Joined
- Aug 26, 2016
- Messages
- 139
Why timer doesn't stop?
JASS:
function Trig_LMB22_Actions takes nothing returns nothing
local timer TimerAct2 = GetExpiredTimer()
local integer BB = GetHandleId(TimerAct2)
call DisplayTextToForce( GetPlayersAll(), "Off" )
call PauseTimer(TimerAct2)
call DestroyTimer(TimerAct2)
set TimerAct2 = null
endfunction
function Trig_LMB21_Actions takes nothing returns nothing
local timer TimerAct2 = CreateTimer()
local integer BB = GetHandleId(TimerAct2)
call SaveReal(Hash, BB, StringHash("processs"), 0)
call DisplayTextToForce( GetPlayersAll(), "On" )
call TimerStart(TimerAct2, 0.10, false, function Trig_LMB21_Actions)
set TimerAct2 = null
endfunction
function Trig_LMB22_Conditions takes nothing returns boolean
if ( not ( BlzGetTriggerPlayerMouseButton() == MOUSE_BUTTON_TYPE_RIGHT ) ) then
return false
endif
return true
endfunction
function Trig_LMB21_Conditions takes nothing returns boolean
if ( not ( BlzGetTriggerPlayerMouseButton() == MOUSE_BUTTON_TYPE_RIGHT ) ) then
return false
endif
return true
endfunction
//===========================================================================
function InitTrig_LMB2 takes nothing returns nothing
set gg_trg_LMB2 = CreateTrigger( )
call TriggerAddCondition( gg_trg_LMB2, Condition( function Trig_LMB22_Conditions ) )
call TriggerAddCondition( gg_trg_LMB2, Condition( function Trig_LMB21_Conditions ) )
endfunction