• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Multiboard: creating materials.

Status
Not open for further replies.
Level 6
Joined
Jan 29, 2010
Messages
213
Hi all! I need some help I'm creating resources for my map that has to be shown in multiboard. But it don't show anything! :nw:

  • materials
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) controller) Equal to User
          • (Player 1 (Red) slot status) Equal to Is playing
        • Then - Actions
          • Set Stone_Red = 0
          • Set Wood_Red = 0
          • Set Water_Red = 0
          • Set Grain_Red = 0
          • Set Meat_Red = 0
          • Multiboard - Create a multiboard with 5 columns and 1 rows, titled -=-=-=-=-=-=-=-=Red...
          • Set Resources_Red = (Last created multiboard)
          • Multiboard - Set the text for Resources_Red item in column 1, row 1 to (Stone: + Count[Stone_Red])
          • Multiboard - Set the text for Resources_Red item in column 2, row 1 to (Wood: + Count[Wood_Red])
          • Multiboard - Set the text for Resources_Red item in column 3, row 1 to (Water: + Count[Water_Red])
          • Multiboard - Set the text for Resources_Red item in column 4, row 1 to (Grain: + Count[Grain_Red])
          • Multiboard - Set the text for Resources_Red item in column 5, row 1 to (Meat: + Count[Meat_Red])
          • Multiboard - Set the icon for Resources_Red item in column 1, row 1 to ReplaceableTextures\CommandButtons\BTNGolemStormBolt.blp
          • Multiboard - Set the icon for Resources_Red item in column 2, row 1 to ReplaceableTextures\CommandButtons\BTNBundleOfLumber.blp
          • Multiboard - Set the icon for Resources_Red item in column 3, row 1 to ReplaceableTextures\CommandButtons\BTNPotionBlueBig.blp
          • Multiboard - Set the icon for Resources_Red item in column 4, row 1 to ReplaceableTextures\CommandButtons\BTNQuillSprayOff.blp
          • Multiboard - Set the icon for Resources_Red item in column 5, row 1 to ReplaceableTextures\CommandButtons\BTNMonsterLure.blp
          • For each (Integer A) from 1 to 1, do (Actions)
            • Loop - Actions
              • Multiboard - Set the display style for Resources_Red item in column 1, row 1 to Show text and Show icons
              • Multiboard - Set the display style for Resources_Red item in column 2, row 1 to Show text and Show icons
              • Multiboard - Set the display style for Resources_Red item in column 3, row 1 to Show text and Show icons
              • Multiboard - Set the display style for Resources_Red item in column 4, row 1 to Show text and Show icons
              • Multiboard - Set the display style for Resources_Red item in column 5, row 1 to Show text and Show icons
              • Multiboard - Set the width for Resources_Red item in column 1, row 1 to 10.00% of the total screen width
              • Multiboard - Set the width for Resources_Red item in column 2, row 1 to 10.00% of the total screen width
              • Multiboard - Set the width for Resources_Red item in column 3, row 1 to 10.00% of the total screen width
              • Multiboard - Set the width for Resources_Red item in column 4, row 1 to 10.00% of the total screen width
              • Multiboard - Set the width for Resources_Red item in column 5, row 1 to 10.00% of the total screen width
        • Else - Actions
  • test
    • Events
      • Player - Player 1 (Red) types a chat message containing aaa as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • Set Stone_Red = (Stone_Red + 1)
          • Set Wood_Red = (Wood_Red + 1)
          • Set Water_Red = (Water_Red + 1)
          • Set Grain_Red = (Grain_Red + 1)
          • Set Meat_Red = (Meat_Red + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
              • Game - Display to (All players) the text: ((Stone: + Count[Stone_Red]) + (( / Wood: + Count[Wood_Red]) + (( / Water: + Count[Water_Red]) + (( / Grain: + Count[Grain_Red]) + ( / Meat: + Count[Meat_Red])))))
            • Else - Actions
        • Else - Actions
 
Level 6
Joined
Jan 29, 2010
Messages
213
All works ok! But there isn't showing numbers like in start multiborad has to look kike that:
Stone:0 | Wood:0 | Water:0 | Grain:0 | Meat:0
But it shows like that:
Stone: | Wood: | Water: | Grain: | Meat:
When I type "aaa" appears text in chat witch has to be like that:
Stone:1 / Wood:1 / Water:1 / Grain:1 / Meat:1
But it shows only:
Stone: / Wood: / Water: / Grain: / Meat:

There's problem with variables:
Count=String[equal]
*_Red=integer
 
You use Count[Stone_Red], Count[Wood_Red], etc. I don't see you having set the Count variable. You need to use (String(Stone_Red)), (String(Wood_Red)), etc.
Go from Conversion - Convert Integer to String and use those integers instead of Count variable.
The same goes for your second trigger:
  • Game - Display to (All players) the text: ((Stone: + (String(Stone_Red)) + (( /
 
Level 6
Joined
Jan 29, 2010
Messages
213
variables:
Count=String[equal]
Stone_Red=integer
Wood_Red=integer
Water_Red=integer
Grain_Red=integer
Meat_Red=integer

variable count is string I just named it like that because in my triggers there's much of variables named with word "string"
 
Level 6
Joined
Jan 29, 2010
Messages
213
It's possible to make every player to have different multiboard like red has his own where write how many he have stone, wood, water,... and other blue have stone, wood,... but they don't see each other boards with resources?
 
Status
Not open for further replies.
Top