• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

How do you...

Status
Not open for further replies.
Level 9
Joined
Oct 6, 2007
Messages
406
I'm looking to add a function that tells you what "year" it is. I've seen it done in a map, I can't remember which, and since I reformated, I no longer have the map. So, is there any way I can make it where it tells you what year it is?

For example: The time (in game) reaches 24:00 (12 AM Midnight) the year would be 1956.

Any help is appreciated.
 
you would have to add a trigger that adds to a set variable like every 60 sec add 1 to date when date = 10 add 1 to year then make a multi board that shows year
 
Here are the triggers for month/year multiboard.



Variables:


MonthBoard - Multiboard
MonthValue - Integer.
MonthName - String Array (12)
Year - Integer.

  • MultiboardCreate
    • Events
      • All - Map Initialization
    • Actions
      • Multiboard - Create a multiboard with 2 columns and 1 rows, labelled Month.
      • Set MonthBoard = (Last Created Multiboard)
      • Multiboard - Change the Title of MonthBoard to Month, year
      • Multiboard - Set the text for MonthBoard item in column 1, row 1 to MonthName[MonthValue]
      • Multiboard - Set the text for MonthBoard item in column 2, row 1 to Year (under Conversion - Convert Integer to String)
      • Multiboard - Show MonthBoard

  • Month Set (initially off)
    • Events
      • Time - Every X seconds (X = 1 month, the value is defined by you)
    • Actions
      • All - If/Then/Else - Multiple Actions
        • If - Conditions
          • Month Is Less than 12
        • Then - Actions
          • Set Month = Month + 1
        • Else - Actions
          • Set Month = 1
          • Set Year = Year + 1
So if December is over, the month value will return to January and a new year will start.

  • Month Names
    • Events
      • Map Initialization
    • Actions
      • Set MonthName [1] to January
      • Set MonthName [2] to February
      • Set MonthName [3] to March
      • Set MonthName [4] to April
      • Set MonthName [5] to May
      • Set MonthName [6] to June
      • Set MonthName [7] to July
      • Set MonthName [8] to August
      • Set MonthName [9] to September
      • Set MonthName [10] to October
      • Set MonthName [11] to November
      • Set MonthName [12] to December
      • Set MonthValue to 1
      • Set Year to 1950 (for example)
      • Trigger - Turn on Month Set
 
Last edited:
Here are the triggers for month/year multiboard.



Variables:


MonthBoard - Multiboard
MonthValue - Integer.
MonthName - String Array (12)
Year - Integer.

  • MultiboardCreate
    • Events
      • All - Map Initialization
    • Actions
      • Multiboard - Create a multiboard with 2 columns and 1 rows, labelled Month.
      • Set MonthBoard = (Last Created Multiboard)
      • Multiboard - Change the Title of MonthBoard to Month, year
      • Multiboard - Set the text for MonthBoard item in column 1, row 1 to MonthName[MonthValue]
      • Multiboard - Set the text for MonthBoard item in column 2, row 1 to Year (under Conversion - Convert Integer to String)
      • Multiboard - Show MonthBoard

  • Month Set (initially off)
    • Events
      • Time - Every X seconds (X = 1 month, the value is defined by you)
    • Actions
      • All - If/Then/Else - Multiple Actions
        • If - Conditions
          • Month Is Less than 12
        • Then - Actions
          • Set Month = Month + 1
        • Else - Actions
          • Set Month = 1
          • Set Year = Year + 1
So if December is over, the month value will return to January and a new year will start.

  • Month Names
    • Events
      • Map Initialization
    • Actions
      • Set MonthName [1] to January
      • Set MonthName [2] to February
      • Set MonthName [3] to March
      • Set MonthName [4] to April
      • Set MonthName [5] to May
      • Set MonthName [6] to June
      • Set MonthName [7] to July
      • Set MonthName [8] to August
      • Set MonthName [9] to September
      • Set MonthName [10] to October
      • Set MonthName [11] to November
      • Set MonthName [12] to December
      • Set MonthValue to 1
      • Set Year to 1950 (for example)
      • Trigger - Turn on Month Set

Ok, I did everything but the 2nd step. Where do you get that "All - If/Then/Else - Multiple Actions
If - Conditions
Month Is Less than 12
Then - Actions
Set Month = Month + 1
Else - Actions
Set Month = 1
Set Year = Year + 1" ? I can't find Month (Never had to make a variable for it. If it's a variable, then I need to make it) So, where do you get Month from?

*EDIT*

I added Month as an integer variable. I completed everything, put everything like you've put it, and the multiboard doesn't show up when I run the map. Have I done something wrong? Also, on the Trigger - Turn on MonthSet, there's a (gen) next to it and all of the other triggers I have. Is this the problem?
 
Last edited:
They mean that the multiboard won't be shown because of the event Map Initialization. Well you can easily fix that with the event elapsed time or just make a Wait(0) at begin of the trigger.

Ok, I did that, and it works, BUT, it shows the first 3 letters of January, and 200 instead of 2007. Plus it shows the Observation sign. How do I fix the multiboard to be bigger?

wtf.JPG
 
trigger or it did not happen ^.^
only thing i can tell you that you have to det the respective row/cououm in the multiboard to the "new" month.
So add this
  • Multiboard - Set the text for MonthBoard item in column 1, row 1 to MonthName[MonthValue]
  • Multiboard - Set the text for MonthBoard item in column 2, row 1 to Year (under Conversion - Convert Integer to String)
after your periodic month-changer-trigger due to multiboards don't change automatically; you have to tell them ;)
 
trigger or it did not happen ^.^
only thing i can tell you that you have to det the respective row/cououm in the multiboard to the "new" month.
So add this
Multiboard - Set the text for MonthBoard item in column 1, row 1 to MonthName[MonthValue]

Multiboard - Set the text for MonthBoard item in column 2, row 1 to Year (under Conversion - Convert Integer to String)

after your periodic month-changer-trigger due to multiboards don't change automatically; you have to tell them ;)

Errr....what? What do I add lol. Can't tell with your sentences.
 
Crap, I must test my triggers before I post them... they leak like hell... -.- Sorry for the inconvenience.

  • Month Set (initially off)
    • Events
      • Time - Every X seconds (X = 1 month, the value is defined by you)
    • Actions
      • All - If/Then/Else - Multiple Actions
        • If - Conditions
          • Month Is Less than 12
        • Then - Actions
          • Set Month = Month + 1
          • Multiboard - Set the text for MonthBoard item in column 1, row 1 to MonthName[MonthValue]
        • Else - Actions
          • Set Month = 1
          • Multiboard - Set the text for MonthBoard item in column 1, row 1 to MonthName[MonthValue]
          • Set Year = Year + 1
          • Multiboard - Set the text for MonthBoard item in column 2, row 1 to Year
 
You know what? I am an idiot.

  • Month Set (initially off)
  • Events
    • Time - Every X seconds (X = 1 month, the value is defined by you)
  • Actions
    • All - If/Then/Else - Multiple Actions
      • If - Conditions
        • MonthValue Is Less than 12
      • Then - Actions
        • Set MonthValue = MonthValue + 1
        • Multiboard - Set the text for MonthBoard item in column 1, row 1 to MonthName[MonthValue]
      • Else - Actions
        • Set MonthValue = 1
        • Multiboard - Set the text for MonthBoard item in column 1, row 1 to MonthName[MonthValue]
        • Set Year = Year + 1
        • Multiboard - Set the text for MonthBoard item in column 2, row 1 to Year
The variable that you need to change is MonthValue, because if it changes from 1 to 2, that would mean MnothName[2], February.

The variables needed for this trigger should be "MonthValue" (integer), "MonthName" (string array), and Year (Integer). No "Month" variable should be present.

Again, I am sorry for the inconvenience. I want -rep for confusing you.
 
Status
Not open for further replies.
Back
Top