Reset Timer...

Grags_1977

Ultra Cool Member
Reaction score
32
Searchers... This is how you reset a Countdown Timer.

Trigger:
  • Your Trigger
    • Events
    • Conditions
    • Actions
      • Countdown Timer - Pause YourTimer
      • Countdown Timer - Start YourTimer as a One-shot timer that will expire in 120.00 seconds


Many thanks inevit4ble. :thup:



Original Message
Grrr my trigger isn't working. It just gives me a blank timer window...

Trigger:
  • Unit Attacked
    • Events
      • Unit - A unit owned by Player 12 (Brown) Is attacked
    • Conditions
      • (Attacking unit) Equal to Unit_Hero
    • Actions
      • Countdown Timer - Destroy (Last created timer window)
      • Custom script: call DestroyTimer( udg_TimerFriendsAgain )
      • Player Group - Make (All players) treat (All players) as an Enemy
      • Countdown Timer - Start TimerFriendsAgain as a One-shot timer that will expire in 120.00 seconds
      • Countdown Timer - Create a timer window for TimerFriendsAgain with title Wanted!
      • Countdown Timer - Pause (Last started timer)


What i'm after is every time the hero attacks a villager the timer resets back to 2 minutes.

I've searched high and low on the forums which is where I got the custom script. But all it's doing is giving me a blank timer window.


Any help please?
 

Grags_1977

Ultra Cool Member
Reaction score
32
You just destroyed the TimerFriendsAgain timer before trying to run it. Try not destroying it.

You're not reading it correctly ;).
Destroy the timer first, then recreate it, which in theory should reset it. But obviously it isn't working.

The timer HAS to be destroyed because even though the window is not showing, the timer is still running in the background. This causes quite a few problems.
 

inevit4ble

Well-Known Member
Reaction score
38
you want to "Pause Timer" and then when you "Start Timer" it resets. Destroying a timer cancels it out
 

Grags_1977

Ultra Cool Member
Reaction score
32
you want to "Pause Timer" and then when you "Start Timer" it resets. Destroying a timer cancels it out

Ty +rep!

EDIT: nvm, have to spread it about. I owe you one!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top