• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

[Trigger] Please Help

Status
Not open for further replies.
Level 3
Joined
Nov 3, 2017
Messages
34
There is a trigger, whose task - at the end of the timer to zero the variable of the whole type. The timer starts all right, and the trigger to reset the variable does not work.

Code:
function Trig_ResetP1_Actions takes nothing returns nothing
    set udg_tk[1] = 0
    call DestroyTimer(udg_tkk[1])
endfunction

//===========================================================================
function InitTrig_ResetP1 takes nothing returns nothing
    set gg_trg_ResetP1 = CreateTrigger(  )
    call TriggerRegisterTimerExpireEvent(gg_trg_ResetP1, udg_tkk[1])
    call TriggerAddAction( gg_trg_ResetP1, function Trig_ResetP1_Actions )
endfunction
 
Status
Not open for further replies.
Top