• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Counting Timer

Status
Not open for further replies.
Level 12
Joined
May 22, 2015
Messages
1,051
Do you want it to count down? I don't know how to make one that counts up.
 
Level 12
Joined
May 22, 2015
Messages
1,051
I suppose you could actually do this with a multiboard lol. You could just do the time manually - storing seconds, minutes, and hours into variables and increment them / display them with a trigger.
 
Level 18
Joined
May 11, 2012
Messages
2,108
This is how I keep track of my current game time.
I don't feel like explaining this, I think you can figure out this by yourself.

  • Game Time
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • S0 Equal to 9
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • S1 Equal to 5
              • S0 Equal to 9
            • Then - Actions
              • Set S0 = 0
              • Set S1 = 0
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • M0 Equal to 9
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • M1 Equal to 5
                      • M0 Equal to 9
                    • Then - Actions
                      • Set M0 = 0
                      • Set M1 = 0
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • H0 Equal to 9
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • H1 Equal to 5
                              • H0 Equal to 9
                            • Then - Actions
                              • Set H0 = 0
                              • Set H1 = 0
                            • Else - Actions
                              • Set H1 = (H1 + 1)
                          • Set H0 = 0
                        • Else - Actions
                          • Set H0 = (H0 + 1)
                    • Else - Actions
                      • Set M1 = (M1 + 1)
                  • Set M0 = 0
                • Else - Actions
                  • Set M0 = (M0 + 1)
            • Else - Actions
              • Set S1 = (S1 + 1)
          • Set S0 = 0
        • Else - Actions
          • Set S0 = (S0 + 1)
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,267
what type is variables S0 , M0 , H0?
And how to show this in map? (time window)
i'm noob.. sorry
i can only take from another map :/
is hard for a beginner
He just made it multiboard friendly, not user friendly necesary

I can make it simpler example for you. You really only need 3 integer variables for seconds, minutes and hours.



Add this into init trigger

This is an example
  • Multiboard - Create a multiboard with 3 columns and ((Number of players in Players) + 4) rows, titled |c000000c3Empire Stats|r
  • Set MultiBoardTimerPos = ((Number of players in Players) + 4)
  • // MultiBoardTimerPos is an example how to put timer at a certain place at multiboard, its a number value
  • Set multiboard1 = (Last created multiboard)
Main trigger

  • GameTime1hour
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set GameTimeElapsedSec = (GameTimeElapsedSec + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GameTimeElapsedSec Greater than 59
        • Then - Actions
          • Set GameTimeElapsedSec = (GameTimeElapsedSec - 60)
          • Set GameTimeElapsedMin = (GameTimeElapsedMin + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GameTimeElapsedMin Greater than 59
        • Then - Actions
          • Set GameTimeElapsedMin = (GameTimeElapsedMin - 60)
          • Set GameTimeElapsedHour = (GameTimeElapsedHour + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • GameTimeElapsedSec Less than 10
          • GameTimeElapsedMin Less than 10
        • Then - Actions
          • Multiboard - Set the text for multiboard1 item in column 1, row MultiBoardTimerPos to (((String(GameTimeElapsedHour)) + :0) + ((String(GameTimeElapsedMin)) + (:0 + (String(GameTimeElapsedSec)))))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • GameTimeElapsedSec Less than 10
            • Then - Actions
              • Multiboard - Set the text for multiboard1 item in column 1, row MultiBoardTimerPos to (((String(GameTimeElapsedHour)) + :) + ((String(GameTimeElapsedMin)) + (:0 + (String(GameTimeElapsedSec)))))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • GameTimeElapsedMin Less than 10
                • Then - Actions
                  • Multiboard - Set the text for multiboard1 item in column 1, row MultiBoardTimerPos to (((String(GameTimeElapsedHour)) + :0) + ((String(GameTimeElapsedMin)) + (: + (String(GameTimeElapsedSec)))))
                • Else - Actions
                  • Multiboard - Set the text for multiboard1 item in column 1, row MultiBoardTimerPos to (((String(GameTimeElapsedHour)) + :) + ((String(GameTimeElapsedMin)) + (: + (String(GameTimeElapsedSec)))))
 
Status
Not open for further replies.
Top