• Check out the results of the Techtree Contest #19!
  • 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 void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Multiboard Timer does not work correctly

Status
Not open for further replies.
Level 4
Joined
Aug 15, 2010
Messages
53
Hi, I need little help for Multiboard.

I am create a Multiboard Counter, but it does not work correctly.

1. -----------
  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set BossDK[1] = 1
      • Set BossDK[2] = 30
      • Set BossDK[3] = 0
      • Set BossDK[4] = 0
      • Set Aktivasyon[1] = False
2. -----------
  • BossBOARD 01
    • 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
          • BossDK[1] Less than 0
          • BossDK[2] Less than 0
        • Then - Actions
          • Set Aktivasyon[1] = False
          • Set BossDK[1] = 0
          • Set BossDK[2] = 0
          • Multiboard - Set the text for Multiboard item in column 4, row 9 to (PlayerColors[(Player number of Player 10 (Light Blue))] + (Seytani Dev + |r geldi!))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Aktivasyon[1] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • BossDK[2] Greater than or equal to 10
                • Then - Actions
                  • Multiboard - Set the text for Multiboard item in column 4, row 9 to ((String(BossDK[3])) + ((String(BossDK[1])) + ( : + (String(BossDK[2])))))
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • BossDK[2] Less than 10
                • Then - Actions
                  • Multiboard - Set the text for Multiboard item in column 4, row 9 to ((String(BossDK[3])) + ((String(BossDK[1])) + ( : + ((String(BossDK[4])) + (String(BossDK[2]))))))
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • BossDK[2] Greater than or equal to 0
                • Then - Actions
                  • Set BossDK[2] = (BossDK[2] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • BossDK[2] Less than 0
                    • Then - Actions
                      • Set BossDK[2] = 59
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • BossDK[1] Greater than or equal to 0
                        • Then - Actions
                          • Set BossDK[1] = (BossDK[1] - 1)
                        • Else - Actions
                    • Else - Actions
                • Else - Actions
            • Else - Actions
When the counter is zero, it continues to count negative numbers.
I did not understand where the problem was.
I'm very happy if you can help me.

(My English is not very good. That's why I use google translate. I am sorry for my mistakes.)
 
  • If - Conditions
    • BossDK[1] Less than 0
    • BossDK[2] Less than 0
  • Then - Actions
That condition will never be true, because as soon as BossDK[2] is set to -1, you set it back to 59 right away.

EDIT: Well, I got bored, and I ended up making another version
  • Countdown
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • TimeUp Equal to False
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Seconds Greater than 0
        • Then - Actions
          • Set Seconds = (Seconds - 1)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Minutes Greater than 0
            • Then - Actions
              • Set Minutes = (Minutes - 1)
              • Set Seconds = 59
            • Else - Actions
      • -------- Display Values --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Seconds Less than or equal to 0
          • Minutes Less than or equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Set TimeUp = True
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Time UP
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to
        • Else - Actions
          • Set Minutes_STR = (String(Minutes))
          • Set Seconds_STR = (String(Seconds))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Length of Seconds_STR) Equal to 1
            • Then - Actions
              • Set Seconds_STR = (0 + Seconds_STR)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Length of Minutes_STR) Equal to 1
            • Then - Actions
              • Set Minutes_STR = (0 + Minutes_STR)
            • Else - Actions
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to ((Minutes_STR + :) + Seconds_STR)
 

Attachments

Last edited:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • BossDK[2] Greater than or equal to 0
    • Then - Actions
      • Set BossDK[2] = (BossDK[2] - 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BossDK[2] Less than 0
        • Then - Actions
          • Set BossDK[2] = 59
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • BossDK[1] Greater than or equal to 0
            • Then - Actions
              • Set BossDK[1] = (BossDK[1] - 1)
            • Else - Actions
        • Else - Actions
    • Else - Actions
Imagine that BossDK[2]'s value is 0. Then, the periodic timer fires the trigger actions once again. As soon as it gets to the condition mentioned above (BossDK[2] >= 0), BossDK[2] is subtract by 1 - which leaves it with -1. However, the next line checks if BossDK[2] value is less than 0, which in this case is true - so, its value changes back to 59, not allowing the very first condition block to be true.
 
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • BossDK[2] Greater than or equal to 0
    • Then - Actions
      • Set BossDK[2] = (BossDK[2] - 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BossDK[2] Less than 0
        • Then - Actions
          • Set BossDK[2] = 59
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • BossDK[1] Greater than or equal to 0
            • Then - Actions
              • Set BossDK[1] = (BossDK[1] - 1)
            • Else - Actions
        • Else - Actions
    • Else - Actions
Imagine that BossDK[2]'s value is 0. Then, the periodic timer fires the trigger actions once again. As soon as it gets to the condition mentioned above (BossDK[2] >= 0), BossDK[2] is subtract by 1 - which leaves it with -1. However, the next line checks if BossDK[2] value is less than 0, which in this case is true - so, its value changes back to 59, not allowing the very first condition block to be true.

Ah, thx for help and explanation :)

Jeez, this code is so messy.

What's the goal here, just display a countdown timer on a multiboard?

If you tell us you might get a much cleaner solution.

I already made one. I'm doing a Campaigne. My goal is to send 3 different types of BOSS to the map and set a separate counter for each one. I want to repeat this counter when every boss is dead and I want to show the task about this boss besides the timer.
:vw_sad:I'm not very good at making triggers. I'm trying to improve myself. There was a forum in my language that explained them, but it closed.:goblin_boom: For this reason, I sometimes experience problems. :D
 
Status
Not open for further replies.
Back
Top