• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Timer in Multiboard

Status
Not open for further replies.
Level 1
Joined
Nov 25, 2015
Messages
4
I'm creating TD, but i was able to create few things.

I want to have 2-3 timers in multiboard.

1 timer for Next wave.
2nd timer for Game elapsed?

iIs this possible?
 
Level 29
Joined
Sep 26, 2009
Messages
2,596
AFAIK you can't create timer in multiboard like you can easily create a single timer in a timer window, however it's not that complicated to imitate one - simply fill one column with the time left and for example every 0.1 second update the multiboard.

You can either have 1 loop trigger per timer - it's easy to set up; or have 1 loop trigger for all timers - this requires a bit of logic to put behind it, thus complicated things a tiny bit, but it's far more effective.
 
Level 1
Joined
Nov 25, 2015
Messages
4
What i did is i made variable set it to 30. made multiboard and showed in column 1 static text and column 2 variable .

made 2 triggers



1nd
check if var is 0 or less
event:
every 0.5 sec

Condition:
if var is equal 0

Action:
set var: Var = 0

then i made trigger to update multiboard
Event:
every 1 sec

actions:
set var: var is greater than 0
multiboard set to colum 2 row x to that var


This should work...but it get's reduced form 30 to 29 and stucks at 29
 
Level 9
Joined
Apr 23, 2010
Messages
312
Please post the triggers with trigger tags so we can see why it's getting stuck at 29. How to Easily Post Triggers

You'll want to combine the update with the same trigger that tracks the timers, something like this...
  • Untitled Trigger 002
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • -------- wave timer --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • i_timer_1 Less than or equal to 0
        • Then - Actions
          • Set i_timer_1 = 30
          • -------- your other actions for the wave --------
        • Else - Actions
          • Set i_timer_1 = (i_timer_1 - 1)
      • -------- elapsed game time tracker --------
      • Set i_timer_2 = (i_timer_2 + 1)
      • -------- update your timers --------
      • Multiboard - Set the text for board item in column 2, row 1 to (String(i_timer_1))
      • Multiboard - Set the text for board item in column 2, row 2 to (String(i_timer_2))
If you want something a bit more complex to either wait for the wave to be over before the wave timer starts again or show the elapsed game time as "hh:mm:ss" that will take a bit more effort.
 
Status
Not open for further replies.
Top