• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Multiboards not showing

Status
Not open for further replies.
Level 2
Joined
May 26, 2020
Messages
8
Hi guys!

I've got a problem with my multiboards not showing. I made this trigger and i cannot see either of the 2 multiboards it creates unless i remove the "custom-script-if"-part.

Any suggestions?

Here is my trigger:

[/code]

garrisons multiboard
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
For each (Integer A) from 1 to 2, do (Actions)
Loop - Actions
Multiboard - Create a multiboard with 4 columns and 1 rows, titled |cffFFF66FGarrisons....
Set VariableSet garrison_multiboard[(Integer A)] = (Last created multiboard)
Multiboard - Set the width for (Last created multiboard) item in column 1, row 1 to 1.50% of the total screen width
Multiboard - Set the width for (Last created multiboard) item in column 2, row 1 to 8.00% of the total screen width
Multiboard - Set the width for (Last created multiboard) item in column 3, row 1 to 2.20% of the total screen width
Multiboard - Set the width for (Last created multiboard) item in column 4, row 1 to 2.20% of the total screen width
Multiboard - Set the display style for (Last created multiboard) item in column 1, row 1 to Hide text and Show icons
Multiboard - Set the display style for (Last created multiboard) item in column 2, row 1 to Show text and Hide icons
Multiboard - Set the display style for (Last created multiboard) item in column 3, row 1 to Hide text and Show icons
Multiboard - Set the display style for (Last created multiboard) item in column 4, row 1 to Hide text and Show icons
Multiboard - Set the icon for (Last created multiboard) item in column 1, row 1 to ReplaceableTextures\CommandButtons\BTNbuilding.blp
Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Garrison
Multiboard - Set the icon for (Last created multiboard) item in column 3, row 1 to ReplaceableTextures\CommandButtons\BTNMGExchange.blp
Multiboard - Set the icon for (Last created multiboard) item in column 4, row 1 to ReplaceableTextures\CommandButtons\BTNHumanLumberUpgrade1.blp
Multiboard - Maximize (Last created multiboard)
Custom script: if GetLocalPlayer() != Player(GetForLoopIndexA() - 1) then
Multiboard - Hide garrison_multiboard[(Integer A)]
Custom script: endif

Greets!
 
Level 12
Joined
Jan 30, 2020
Messages
875
First please use the "trigger" and "/trigger" tag (between []) to post your triggers.

Next, your trigger hides the multiboards rather than showing them

Change the line for :
  • Multiboard - Show garrison_multiboard[(Integer A)]
Don't remove the custom script lines, they're dedicated to show 1 of the 2 multiboards to each of the 2 players separately.
 
Level 2
Joined
May 26, 2020
Messages
8
Hi Macadamia!

Thank you for your answer and thank you for the teaching me how to use the trigger tag. This is my first post so i wasn't quite sure how to put the trigger so that it shows nicely.
By now i already figured out the issue. It doesn't have to do with the "hide" function. (i already wrote above that if i remove the custom script section that they show. And since i am hiding the multiboards to all players BUT Player(forA) it should still show at least 1)

The problem was the following:
The loop loops once on intA = 1 thus creating garrison_multiboard[1] and hiding it to all players but Player 1 (which is me, the tester). So far so good.
The loop loops again: int A = 2, thus creating garrison_multiboard[2] which overwrites garrison_multiboard[1]. Then garrison_multiboard[2] gets hidden for Player 1 (which is me again) so i am left with no multiboard at all. [1] got "knocked out" by [2] and [2] got hidden.

Upon realizing the "kock-out" or "overwrite-issue" of multiboards that are showing, the solution was rather simple as you can imagine. I just hid all the multiboards on creation so the ones that follow don't over write the previous ones and then i showed the ones that i want to show to the corresponding player.

  • garrisons multiboard
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • Multiboard - Create a multiboard with 4 columns and 1 rows, titled |cffFFF66FGarrisons....
          • Set VariableSet garrison_multiboard[(Integer A)] = (Last created multiboard)
          • Multiboard - Set the width for (Last created multiboard) item in column 1, row 1 to 1.50% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 2, row 1 to 8.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 3, row 1 to 2.20% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 4, row 1 to 2.20% of the total screen width
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row 1 to Hide text and Show icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 2, row 1 to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 3, row 1 to Hide text and Show icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 4, row 1 to Hide text and Show icons
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 1 to ReplaceableTextures\CommandButtons\BTNbuilding.blp
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Garrison
          • Multiboard - Set the icon for (Last created multiboard) item in column 3, row 1 to ReplaceableTextures\CommandButtons\BTNMGExchange.blp
          • Multiboard - Set the icon for (Last created multiboard) item in column 4, row 1 to ReplaceableTextures\CommandButtons\BTNHumanLumberUpgrade1.blp
          • Multiboard - Maximize (Last created multiboard)
          • Multiboard - Hide (Last created multiboard)
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • Custom script: if GetLocalPlayer() == Player(GetForLoopIndexA() - 1) then
          • Multiboard - Show garrison_multiboard[(Integer A)]
          • Custom script: endif
Thank you for your input!
 
Status
Not open for further replies.
Top