• 🏆 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 for each player don't work

Status
Not open for further replies.
Level 2
Joined
Aug 4, 2010
Messages
23
I created a 12 multiboards using loop, for each players but something went wrong because only player 12 can see the multiboard:
wc3scrnshot080710162456.png


What im doing wrong, here is my trigger:
  • multiboard create
    • Events
    • Conditions
    • Actions
      • Wait 1.00 seconds
      • For each (Integer B) from 1 to 12, do (Actions)
        • Loop - Actions
          • Multiboard - Create a multiboard with 3 columns and 6 rows, titled (|c00AAAAAASP: |r|c00FFC43D + ((String(SP[(Integer B)])) + (|r|c00AAAAAA || win at: |r|c00FFC43D + ((String(ToWin)) + |r))))
          • Set multiboard_index[(Integer B)] = (Last created multiboard)
          • Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
          • For each (Integer A) from 1 to 6, do (Actions)
            • Loop - Actions
              • Multiboard - Set the color for (Last created multiboard) item in column 2, row (Integer A) to (80.00%, 80.00%, 80.00%) with 0.00% transparency
              • Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 1.00% of the total screen width
              • Multiboard - Set the text for (Last created multiboard) item in column 2, row (Integer A) to |c00AAAAAA |||| |r
          • For each (Integer A) from 1 to 6, do (Actions)
            • Loop - Actions
              • Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 7.00% of the total screen width
          • For each (Integer A) from 1 to 6, do (Actions)
            • Loop - Actions
              • Multiboard - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 7.00% of the total screen width
          • Multiboard - Set the color for (Last created multiboard) item in column 1, row 1 to (100.00%, 80.00%, 30.00%) with 0.00% transparency
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to FORCE
          • Multiboard - Set the color for (Last created multiboard) item in column 3, row 1 to (100.00%, 80.00%, 30.00%) with 0.00% transparency
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to POINTS
          • Multiboard - Set the color for (Last created multiboard) item in column 1, row 2 to (80.00%, 80.00%, 80.00%) with 0.00% transparency
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to ==========
          • Multiboard - Set the color for (Last created multiboard) item in column 3, row 2 to (80.00%, 80.00%, 80.00%) with 0.00% transparency
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row 2 to ==========
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 3 to force 1
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 4 to force 2
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 5 to force 3
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 6 to force 4
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row 3 to (String(ForcePoints[1]))
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row 4 to (String(ForcePoints[2]))
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row 5 to (String(ForcePoints[3]))
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row 6 to (String(ForcePoints[4]))
          • Set multiboard_player = (Player((Integer B)))
          • Set multiboard_show[(Integer B)] = False
          • Custom script: if GetLocalPlayer() == udg_multiboard_player then
          • Set multiboard_show[(Integer B)] = True
          • Custom script: endif
      • Custom script: call MultiboardDisplay(udg_multiboard_index[1], udg_multiboard_show[1])
      • Custom script: call MultiboardDisplay(udg_multiboard_index[2], udg_multiboard_show[2])
      • Custom script: call MultiboardDisplay(udg_multiboard_index[3], udg_multiboard_show[3])
      • Custom script: call MultiboardDisplay(udg_multiboard_index[4], udg_multiboard_show[4])
      • Custom script: call MultiboardDisplay(udg_multiboard_index[5], udg_multiboard_show[5])
      • Custom script: call MultiboardDisplay(udg_multiboard_index[6], udg_multiboard_show[6])
      • Custom script: call MultiboardDisplay(udg_multiboard_index[7], udg_multiboard_show[7])
      • Custom script: call MultiboardDisplay(udg_multiboard_index[8], udg_multiboard_show[8])
      • Custom script: call MultiboardDisplay(udg_multiboard_index[9], udg_multiboard_show[9])
      • Custom script: call MultiboardDisplay(udg_multiboard_index[10], udg_multiboard_show[10])
      • Custom script: call MultiboardDisplay(udg_multiboard_index[11], udg_multiboard_show[11])
      • Custom script: call MultiboardDisplay(udg_multiboard_index[12], udg_multiboard_show[12])
      • Wait 10.00 seconds
      • Trigger - Run multiboard refresh <gen> (ignoring conditions)
 
Level 9
Joined
May 27, 2006
Messages
498
Thats because AI players are also treated as local players, therefore the local player check will be true multiple times on your machine.

You could add additional condition to prevent it from showing multiboards for AI.
JASS:
if GetLocalPlayer() == Player(bj_forLoopBIndex - 1) and GetPlayerController(Player(bj_forLoopBIndex - 1)) == MAP_CONTROL_USER then
The Player(bj_forLoopBIndex - 1) is because in Jass red player is player 0, blue is player 1, etc.
 
Last edited:
Status
Not open for further replies.
Top