• 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.

Secound's like MultiBoard

Status
Not open for further replies.
Level 3
Joined
Jul 30, 2011
Messages
50
Hey again :)

I want to know, how to make "Multiboard secound" something like that.
I put Eplased Time 360 sec , and i want to make to number 6:00 , 5:59,5:58,5:57 .... etc and when is 00:00 again number to 6:00,5:59...etc for 8 times...

Hope you understoond. Thanks.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Create a Timer as a variable of type "Timer". and start it whenever you want.
Timer - Star YourTimer as a Repeating Timer that will expire in 1 seconds

Also create the Multiboard and a variable to manage it. Call it "TimerBoard" and 3 Integer variables: Seconds, Minutes, Frequency. On map init, "Set Seconds = 60" and "Set Minutes = 6"

Now, the trigger to show the seconds.

Event - YourTimer expires.
Actions ->
-> Set Seconds = Seconds -1
-> If/Then/Else. If Seconds = 0, THEN Set Minutes = Minutes -1 AND set Seconds = 60, ELSE (Do nothing).
-> If/Then/Else If Minutes is = 0 Then Set Frequency = Frequency + 1 AND set minutes = 6.
-> Update your multiboard to read (Concatenated Strings:) "Minutes" + ":" + "Seconds"
 
Level 3
Joined
Jul 30, 2011
Messages
50
see my signature Dungeon Assault, it has an elapsed timer...a multiboard system I created in vJASS and easy to use...if you want it, tell me...

Thanks, but not work to enter in your map...
Can you help me?
Thanks



- Spartipilo , I don't understoond.... xD
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219

  • setup
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 1 columns and 1 rows, titled time
      • Set my_board = (Last created multiboard)
      • Multiboard - Set the display style for my_board item in column 1, row 1 to Show text and Hide icons
      • Multiboard - Show all multiboards
  • loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Multiboard - Set the text for my_board item in column 1, row 1 to ((String(hours)) + (, + ((String(minutes)) + (, + (String(seconds))))))
      • Set seconds = (seconds + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • seconds Equal to 60
        • Then - Actions
          • Set seconds = 0
          • Set minutes = (minutes + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • minutes Equal to 60
            • Then - Actions
              • Set minutes = 0
              • Set hours = (hours + 1)
            • Else - Actions
        • Else - Actions
 

Attachments

  • time system.w3x
    16.3 KB · Views: 59
Level 3
Joined
Jul 30, 2011
Messages
50
Hey Darkgrom, thanks but i want countdown.. when i research 00:00 again countdown 6:00 , 5:59 ...etc
( 8 times countdown... when i research 8 times , the multiboard disabled)
 
Level 3
Joined
Jul 30, 2011
Messages
50
Thank you!

EDIT: Ehm, there is a bug.
when is 1.00 again countdown to 1.59 ......... and so... trying your self...
and you can change from " . " to " : "
 
Last edited:
Level 3
Joined
Jul 30, 2011
Messages
50
fixed. work fine fo me now

edit i forgot to edit the text but use this
  • Multiboard - Set the text for my_board item in column 1, row 1 to ((String(minutes)) + (: + (String(seconds))))


Ty, Work " : " , but when i research 00:00 , minutes and secounds it's gonna crazy... when i research 00:00 , they been -1:60 not 7:60 ...
 
  • Timer
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set MT_Seconds = (MT_Seconds + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MT_Seconds Equal to 60
        • Then - Actions
          • Set MT_Seconds = 0
          • Set MT_Minutes = (MT_Minutes + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MT_Minutes Equal to 60
            • Then - Actions
              • Set MT_Minutes = 0
              • Set MT_Hours = (MT_Hours + 1)
            • Else - Actions
        • Else - Actions
      • Multiboard - Set the text for Multiboard item in column 2, row 2 to ((String(MT_Hours)) + ( : + ((String(MT_Minutes)) + ( : + (String(MT_Seconds))))))
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Edited the trigger:
  • loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set seconds = (seconds - 1)
      • Multiboard - Set the text for my_board item in column 1, row 1 to ((String(minutes)) + (, + (String(seconds))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • seconds Equal to 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • minutes Equal to 0
            • Then - Actions
              • Set repeat_count = (repeat_count + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • repeat_count Equal to 8
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
                  • Set minutes = 7
                  • Set seconds = 60
            • Else - Actions
              • Set minutes = (minutes - 1)
              • Set seconds = 60
        • Else - Actions
 
Status
Not open for further replies.
Top