• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

Multiboard help

Status
Not open for further replies.
Level 2
Joined
Sep 12, 2009
Messages
16
hey I need some help with my multiboard

I made this code
This is for player 1 , multiboard doesn't show up

  • Multiboard 1
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 4 columns and 13 rows, titled Resources
      • Set Multiboard[1] = (Last created multiboard)
      • For each (Integer A) from 1 to 13, do (Actions)
        • Loop - Actions
          • Multiboard - Set the width for Multiboard[1] item in column 1, row (Integer A) to 9.00% of the total screen width
          • Multiboard - Set the width for Multiboard[1] item in column 2, row (Integer A) to 6.00% of the total screen width
          • Multiboard - Set the width for Multiboard[1] item in column 3, row (Integer A) to 9.00% of the total screen width
          • Multiboard - Set the width for Multiboard[1] item in column 4, row (Integer A) to 6.00% of the total screen width
          • -------- ---------------------------------- --------
          • Multiboard - Set the display style for Multiboard[1] item in column 1, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for Multiboard[1] item in column 2, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for Multiboard[1] item in column 3, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for Multiboard[1] item in column 4, row (Integer A) to Show text and Hide icons
      • -------- ROW 1 RESOURCES --------
      • Multiboard - Set the text for Multiboard[1] item in column 1, row 1 to (ColorText + ([Type] + ColorSuffix))
      • Multiboard - Set the text for Multiboard[1] item in column 2, row 1 to (ColorText + ([Amount] + ColorSuffix))
      • Multiboard - Set the text for Multiboard[1] item in column 3, row 1 to (ColorText + (Type + ColorSuffix))
      • Multiboard - Set the text for Multiboard[1] item in column 4, row 1 to (ColorText + ([Amount] + ColorSuffix))
      • -------- Row 2 IRON + STEEL --------
      • Multiboard - Set the text for Multiboard[1] item in column 1, row 2 to Iron
      • Multiboard - Set the icon for Multiboard[1] item in column 1, row 2 to ReplaceableTextures\CommandButtons\BTNCassiterite.blp
      • Multiboard - Set the display style for Multiboard[1] item in column 1, row 2 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[1] item in column 2, row 2 to (String(ResourceIron[1]))
      • Multiboard - Set the text for Multiboard[1] item in column 3, row 2 to Steel
      • Multiboard - Set the icon for Multiboard[1] item in column 3, row 2 to ReplaceableTextures\CommandButtons\BTNINV_Ingot_Steel.blp
      • Multiboard - Set the display style for Multiboard[1] item in column 3, row 2 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[1] item in column 4, row 2 to (String(ResourceSteel[1]))
      • -------- ROW 3 COPPER + BRONZE --------
      • Multiboard - Set the text for Multiboard[1] item in column 1, row 3 to Copper
      • Multiboard - Set the icon for Multiboard[1] item in column 1, row 3 to ReplaceableTextures\CommandButtons\BTNINV_Ore_Copper_01.blp
      • Multiboard - Set the display style for Multiboard[1] item in column 1, row 3 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[1] item in column 2, row 3 to (String(ResourceCopper[1]))
      • Multiboard - Set the text for Multiboard[1] item in column 3, row 3 to Bronze
      • Multiboard - Set the icon for Multiboard[1] item in column 3, row 3 to ReplaceableTextures\CommandButtons\BTNINV_Ingot_Bronze.blp
      • Multiboard - Set the display style for Multiboard[1] item in column 3, row 3 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[1] item in column 4, row 3 to (String(ResourceBronze[1]))
      • -------- ROW 4 TIN --------
      • Multiboard - Set the text for Multiboard[1] item in column 1, row 4 to Tin
      • Multiboard - Set the icon for Multiboard[1] item in column 1, row 4 to ReplaceableTextures\CommandButtons\BTNINV_Ore_Tin_01.blp
      • Multiboard - Set the display style for Multiboard[1] item in column 1, row 4 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[1] item in column 2, row 4 to (String(ResourceTin[1]))
      • -------- ROW 5 STONE + BRICKS --------
      • Multiboard - Set the text for Multiboard[1] item in column 1, row 5 to Stone
      • Multiboard - Set the icon for Multiboard[1] item in column 1, row 5 to ReplaceableTextures\CommandButtons\BTNINV_Stone_12.blp
      • Multiboard - Set the display style for Multiboard[1] item in column 1, row 5 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[1] item in column 2, row 5 to (String(ResourceStone[1]))
      • Multiboard - Set the text for Multiboard[1] item in column 3, row 5 to Bricks
      • Multiboard - Set the icon for Multiboard[1] item in column 3, row 5 to ReplaceableTextures\CommandButtons\BTNINV_Misc_StoneTablet_02.blp
      • Multiboard - Set the display style for Multiboard[1] item in column 3, row 5 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[1] item in column 4, row 5 to (String(ResourceBricks[1]))
      • -------- ROW 6 LUMBER + PLANKS --------
      • Multiboard - Set the text for Multiboard[1] item in column 1, row 6 to Lumber
      • Multiboard - Set the icon for Multiboard[1] item in column 1, row 6 to ReplaceableTextures\WorldEditUI\Doodad-Destructible.blp
      • Multiboard - Set the display style for Multiboard[1] item in column 1, row 6 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[1] item in column 2, row 6 to (String(ResourceLumber[1]))
      • Multiboard - Set the text for Multiboard[1] item in column 3, row 6 to Planks
      • Multiboard - Set the icon for Multiboard[1] item in column 3, row 6 to ReplaceableTextures\CommandButtons\BTNHumanLumberUpgrade2.blp
      • Multiboard - Set the display style for Multiboard[1] item in column 3, row 6 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[1] item in column 4, row 6 to (String(ResourcePlanks[1]))
      • -------- ROW 7 GOLD --------
      • Multiboard - Set the text for Multiboard[1] item in column 1, row 7 to Gold
      • Multiboard - Set the icon for Multiboard[1] item in column 1, row 7 to ReplaceableTextures\CommandButtons\BTNChestOfGold.blp
      • Multiboard - Set the display style for Multiboard[1] item in column 1, row 7 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[1] item in column 2, row 7 to (String(ResourceGold[1]))
      • -------- ROW 8 NIKS --------
      • -------- ROW 9 OIL + GASOLINE --------
      • Multiboard - Set the text for Multiboard[1] item in column 1, row 9 to Oil
      • Multiboard - Set the icon for Multiboard[1] item in column 1, row 9 to ReplaceableTextures\CommandButtons\BTNFireRocks.blp
      • Multiboard - Set the display style for Multiboard[1] item in column 1, row 9 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[1] item in column 2, row 9 to (String(ResourceOil[1]))
      • Multiboard - Set the text for Multiboard[1] item in column 3, row 9 to Gasoline
      • Multiboard - Set the icon for Multiboard[1] item in column 3, row 9 to ReplaceableTextures\CommandButtons\BTNMotor.blp
      • Multiboard - Set the display style for Multiboard[1] item in column 3, row 9 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[1] item in column 4, row 9 to (String(ResourceGasoline[1]))
      • -------- ROW 10 POWER --------
      • Multiboard - Set the text for Multiboard[1] item in column 1, row 10 to Power
      • Multiboard - Set the icon for Multiboard[1] item in column 1, row 10 to ReplaceableTextures\CommandButtons\BTNP_Lightning.blp
      • Multiboard - Set the display style for Multiboard[1] item in column 1, row 10 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[1] item in column 2, row 10 to (String(ResourcePower[1]))
      • -------- ROW 11 NIKS --------
      • -------- ROW 12 ALUMINUM --------
      • Multiboard - Set the text for Multiboard[1] item in column 1, row 12 to Aluminum
      • Multiboard - Set the icon for Multiboard[1] item in column 1, row 12 to ReplaceableTextures\CommandButtons\BTNResistantSkin.blp
      • Multiboard - Set the display style for Multiboard[1] item in column 1, row 12 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[1] item in column 2, row 12 to (String(ResourceAlumium[1]))
      • -------- ROW 13 URANIUM --------
      • Multiboard - Set the text for Multiboard[1] item in column 1, row 13 to Uranium
      • Multiboard - Set the icon for Multiboard[1] item in column 1, row 13 to ReplaceableTextures\CommandButtons\BTNNarcainian Energy Orb.blp
      • Multiboard - Set the display style for Multiboard[1] item in column 1, row 13 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[1] item in column 2, row 13 to (String(ResourceUranium[1]))
      • Multiboard - Set the text for Multiboard[1] item in column 4, row 2 to (String(ResourceSteel[2]))
      • Multiboard - Hide Multiboard[1]
      • Custom script: if ( GetLocalPlayer() == Player(0) ) then
      • Multiboard - Show Multiboard[1]
      • Custom script: endif
This is for player 2 , the multiboard doesn't show up either
  • Multiboard 2
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 4 columns and 13 rows, titled Resources
      • Set Multiboard[2] = (Last created multiboard)
      • For each (Integer A) from 1 to 13, do (Actions)
        • Loop - Actions
          • Multiboard - Set the width for Multiboard[2] item in column 1, row (Integer A) to 9.00% of the total screen width
          • Multiboard - Set the width for Multiboard[2] item in column 2, row (Integer A) to 6.00% of the total screen width
          • Multiboard - Set the width for Multiboard[2] item in column 3, row (Integer A) to 9.00% of the total screen width
          • Multiboard - Set the width for Multiboard[2] item in column 4, row (Integer A) to 6.00% of the total screen width
          • -------- ---------------------------------- --------
          • Multiboard - Set the display style for Multiboard[2] item in column 1, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for Multiboard[2] item in column 2, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for Multiboard[2] item in column 3, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for Multiboard[2] item in column 4, row (Integer A) to Show text and Hide icons
      • -------- ROW 1 RESOURCES --------
      • Multiboard - Set the text for Multiboard[2] item in column 1, row 1 to (ColorText + ([Type] + ColorSuffix))
      • Multiboard - Set the text for Multiboard[2] item in column 2, row 1 to (ColorText + ([Amount] + ColorSuffix))
      • Multiboard - Set the text for Multiboard[2] item in column 3, row 1 to (ColorText + (Type + ColorSuffix))
      • Multiboard - Set the text for Multiboard[2] item in column 4, row 1 to (ColorText + ([Amount] + ColorSuffix))
      • -------- Row 2 IRON + STEEL --------
      • Multiboard - Set the text for Multiboard[2] item in column 1, row 2 to Iron
      • Multiboard - Set the icon for Multiboard[2] item in column 1, row 2 to ReplaceableTextures\CommandButtons\BTNCassiterite.blp
      • Multiboard - Set the display style for Multiboard[2] item in column 1, row 2 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[2] item in column 2, row 2 to (String(ResourceIron[2]))
      • Multiboard - Set the text for Multiboard[2] item in column 3, row 2 to Steel
      • Multiboard - Set the icon for Multiboard[2] item in column 3, row 2 to ReplaceableTextures\CommandButtons\BTNINV_Ingot_Steel.blp
      • Multiboard - Set the display style for Multiboard[2] item in column 3, row 2 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[2] item in column 4, row 2 to (String(ResourceSteel[2]))
      • -------- ROW 3 COPPER + BRONZE --------
      • Multiboard - Set the text for Multiboard[2] item in column 1, row 3 to Copper
      • Multiboard - Set the icon for Multiboard[2] item in column 1, row 3 to ReplaceableTextures\CommandButtons\BTNINV_Ore_Copper_01.blp
      • Multiboard - Set the display style for Multiboard[2] item in column 1, row 3 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[2] item in column 2, row 3 to (String(ResourceCopper[2]))
      • Multiboard - Set the text for Multiboard[2] item in column 3, row 3 to Bronze
      • Multiboard - Set the icon for Multiboard[2] item in column 3, row 3 to ReplaceableTextures\CommandButtons\BTNINV_Ingot_Bronze.blp
      • Multiboard - Set the display style for Multiboard[2] item in column 3, row 3 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[2] item in column 4, row 3 to (String(ResourceBronze[2]))
      • -------- ROW 4 TIN --------
      • Multiboard - Set the text for Multiboard[2] item in column 1, row 4 to Tin
      • Multiboard - Set the icon for Multiboard[2] item in column 1, row 4 to ReplaceableTextures\CommandButtons\BTNINV_Ore_Tin_01.blp
      • Multiboard - Set the display style for Multiboard[2] item in column 1, row 4 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[2] item in column 2, row 4 to (String(ResourceTin[2]))
      • -------- ROW 5 STONE + BRICKS --------
      • Multiboard - Set the text for Multiboard[2] item in column 1, row 5 to Stone
      • Multiboard - Set the icon for Multiboard[2] item in column 1, row 5 to ReplaceableTextures\CommandButtons\BTNINV_Stone_12.blp
      • Multiboard - Set the display style for Multiboard[2] item in column 1, row 5 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[2] item in column 2, row 5 to (String(ResourceStone[2]))
      • Multiboard - Set the text for Multiboard[2] item in column 3, row 5 to Bricks
      • Multiboard - Set the icon for Multiboard[2] item in column 3, row 5 to ReplaceableTextures\CommandButtons\BTNINV_Misc_StoneTablet_02.blp
      • Multiboard - Set the display style for Multiboard[2] item in column 3, row 5 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[2] item in column 4, row 5 to (String(ResourceBricks[2]))
      • -------- ROW 6 LUMBER + PLANKS --------
      • Multiboard - Set the text for Multiboard[2] item in column 1, row 6 to Lumber
      • Multiboard - Set the icon for Multiboard[2] item in column 1, row 6 to ReplaceableTextures\WorldEditUI\Doodad-Destructible.blp
      • Multiboard - Set the display style for Multiboard[2] item in column 1, row 6 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[2] item in column 2, row 6 to (String(ResourceLumber[2]))
      • Multiboard - Set the text for Multiboard[2] item in column 3, row 6 to Planks
      • Multiboard - Set the icon for Multiboard[2] item in column 3, row 6 to ReplaceableTextures\CommandButtons\BTNHumanLumberUpgrade2.blp
      • Multiboard - Set the display style for Multiboard[2] item in column 3, row 6 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[2] item in column 4, row 6 to (String(ResourcePlanks[2]))
      • -------- ROW 7 GOLD --------
      • Multiboard - Set the text for Multiboard[2] item in column 1, row 7 to Gold
      • Multiboard - Set the icon for Multiboard[2] item in column 1, row 7 to ReplaceableTextures\CommandButtons\BTNChestOfGold.blp
      • Multiboard - Set the display style for Multiboard[2] item in column 1, row 7 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[2] item in column 2, row 7 to (String(ResourceGold[2]))
      • -------- ROW 8 NIKS --------
      • -------- ROW 9 OIL + GASOLINE --------
      • Multiboard - Set the text for Multiboard[2] item in column 1, row 9 to Oil
      • Multiboard - Set the icon for Multiboard[2] item in column 1, row 9 to ReplaceableTextures\CommandButtons\BTNFireRocks.blp
      • Multiboard - Set the display style for Multiboard[2] item in column 1, row 9 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[2] item in column 2, row 9 to (String(ResourceOil[2]))
      • Multiboard - Set the text for Multiboard[2] item in column 3, row 9 to Gasoline
      • Multiboard - Set the icon for Multiboard[2] item in column 3, row 9 to ReplaceableTextures\CommandButtons\BTNMotor.blp
      • Multiboard - Set the display style for Multiboard[2] item in column 3, row 9 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[2] item in column 4, row 9 to (String(ResourceGasoline[2]))
      • -------- ROW 10 POWER --------
      • Multiboard - Set the text for Multiboard[2] item in column 1, row 10 to Power
      • Multiboard - Set the icon for Multiboard[2] item in column 1, row 10 to ReplaceableTextures\CommandButtons\BTNP_Lightning.blp
      • Multiboard - Set the display style for Multiboard[2] item in column 1, row 10 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[2] item in column 2, row 10 to (String(ResourcePower[2]))
      • -------- ROW 11 NIKS --------
      • -------- ROW 12 ALUMINUM --------
      • Multiboard - Set the text for Multiboard[2] item in column 1, row 12 to Aluminum
      • Multiboard - Set the icon for Multiboard[2] item in column 1, row 12 to ReplaceableTextures\CommandButtons\BTNResistantSkin.blp
      • Multiboard - Set the display style for Multiboard[2] item in column 1, row 12 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[2] item in column 2, row 12 to (String(ResourceAlumium[2]))
      • -------- ROW 13 URANIUM --------
      • Multiboard - Set the text for Multiboard[2] item in column 1, row 13 to Uranium
      • Multiboard - Set the icon for Multiboard[2] item in column 1, row 13 to ReplaceableTextures\CommandButtons\BTNNarcainian Energy Orb.blp
      • Multiboard - Set the display style for Multiboard[2] item in column 1, row 13 to Show text and Show icons
      • Multiboard - Set the text for Multiboard[2] item in column 2, row 13 to (String(ResourceUranium[2]))
      • Multiboard - Hide Multiboard[2]
      • Custom script: if ( GetLocalPlayer() == Player(1) ) then
      • Multiboard - Show Multiboard[2]
      • Custom script: endif
any help would be great!
 
Level 2
Joined
Sep 12, 2009
Messages
16
damn didn't work :(
Edit : isn't there anothe code u can use ?
something like "call mulitboard[1] etc..."
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
Why you use
  • Custom script: if ( GetLocalPlayer() == Player(1) ) then
For the both triggers? For player 2 that should be "== Player(2)"

By the way, try to make the Event to occur after 5 seconds:
  • Time - Elapsed game time is 5.00 seconds
Also fix the custom scripts, look again at Pharaoh's example.
 
Level 2
Joined
Sep 12, 2009
Messages
16
well i don't use Custom script: if ( GetLocalPlayer() == Player(1) ) then for both trigger
for Red I use player(0) (in JASS its player 0) and for Blue I use player 1
and I used Pharaoh's custom script and it didn't change anything
I'll try the event on 5 seconds although i'm guessing it won't make any difference

Edit: Changed the event to 5 sec. Didn't work.
 
Level 2
Joined
Sep 12, 2009
Messages
16
well i originaly made the code with Last created multiboard and I had the same problem so they recommended my that I use a variable for everything so I don't think that will work and when I disable the 2nd trigger it works but offcourse only for Red and when I disable the 1st one , it works for Blue.
So I still need some help with this...
 
Level 11
Joined
Jun 21, 2007
Messages
505
Sometimes there are so many actions in a single trigger, that Warcraft II can't do all of them in a single moment. SO you have to separate every 50 or 60 or maybe 40 actions with wait 0.01 second, because Warcraft can't do too many actions in a single moment, especially when you use many loops.

and the functions is written like this:

if GetLocalPlayer() == Player(0) then
show multiboard for player 1
endif

if GetLocalPlayer() == Player(1) then
show multiboard for player 2

and If you use Integer A/ Integer B loop, then write this inside loop. Also using GetLocalPlayer is pretty dangerous for multiplayer maps because it very often causes desynchronizations and peiple disconnect from the game.

if GetLocalPlayer() == Player(( GetForLoopIndexA() - 1 )) then
show multiboard to Player(IntegerA)
endif

if GetLocalPlayer() == Player(( GetForLoopIntegerB() - 1 )) then
show multiboard to Player(IntegerB)
endif

All that is what Dr Super Good taught me, so give rep to him if I helped you.
 
Status
Not open for further replies.
Top