• 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.

Multiboard for each player problem

Status
Not open for further replies.
Level 5
Joined
Sep 27, 2011
Messages
141
  • Set Human_Players = (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User)))
  • Player Group - Pick every player in Human_Players and do (Actions)
    • Loop - Actions
      • Set Temp_Player = (Picked player)
      • Set Player_Number = (Player number of Temp_Player)
      • Multiboard - Create a multiboard with 2 columns and 4 rows, titled Hero Picking
      • Set Picking_MultiBoard[Player_Number] = (Last created multiboard)
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Set Temp_Int = (Integer A)
          • Multiboard - Set the display style for (Last created multiboard) item in column 2, row Temp_Int to Show text and Hide icons
          • Multiboard - Set the width for (Last created multiboard) item in column 1, row Temp_Int to 10.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 2, row Temp_Int to 30.00% of the total screen width
      • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 1 to Icon[Hero_Pick_Max]
      • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 2 to Icon[1]
      • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 3 to ReplaceableTextures\WorldEditUI\Editor-Random-Unit.blp
      • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 4 to Icon[2]
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Previous
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to Current
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 4 to Next
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Spectral Knight
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 2 to Deceptor
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 3 to Text[1]
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 4 to NightCaster
      • Multiboard - Set the width for (Last created multiboard) item in column 1, row 3 to 1.50% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 2, row 3 to 38.50% of the total screen width
      • Multiboard - Hide (Last created multiboard)
      • Custom script: if GetLocalPlayer() == udg_Temp_Player then
      • Multiboard - Show Picking_MultiBoard[Player_Number]
      • Custom script: endif
      • Multiboard - Maximize Picking_MultiBoard[Player_Number]
the problem is that the only multiboard diplayed is to player 2 i think i have only tested it with 2 players but anyway player 1 gets no multiboard and yes both player 1 and 2 were in game and human, can someone please tell me whats wrong. Thanks.
 
Level 13
Joined
Sep 13, 2010
Messages
550
  • Multiboard - Create a multiboard with 2 columns and 4 rows, titled Hero Picking
The problem is with this one.

- Why?
- Here comes ugly Jass.

JASS:
function CreateMultiboardBJ takes integer cols, integer rows, string title returns multiboard
    set bj_lastCreatedMultiboard = CreateMultiboard()
    call MultiboardSetRowCount(bj_lastCreatedMultiboard, rows)
    call MultiboardSetColumnCount(bj_lastCreatedMultiboard, cols)
    call MultiboardSetTitleText(bj_lastCreatedMultiboard, title)
    call MultiboardDisplay(bj_lastCreatedMultiboard, true)
    return bj_lastCreatedMultiboard
endfunction
- Ok, but where is the problem?
- In this BJ everything is nice and fine except... this: call MultiboardDisplay(bj_lastCreatedMultiboard, true)

- And this why causes me problems?
- Let me explain. You have a loop for two player, on the first time it creates the board, also displays it, then hides for all, in the end displays for Player Red. Everything is fine, Red has multiboard, Blue doesn't.
Now comes the second period for Blue player. Creates a multiboard, displaying for player Blue, and ALSO displays for Red, hides it for both, and displays for Blue. Now Blue has board, Red doesn't. If you went for 3 players Red nor Blue would have a table.

- Ok ok I have read your badly written shit, can you give a solution??
- Yes, there is several solution. But the easiest:
Replace this line of code:

  • Multiboard - Create a multiboard with 2 columns and 4 rows, titled Hero Picking
With these:

  • Custom script: set bj_lastCreatedMultiboard = CreateMultiboard( ) // Or use "set udg_Picking_MultiBoard[udg_Player_Number] = CreateMultiboard( )" and you won't need the next line :>
  • Set Picking_MultiBoard[Player_Number] = (Last created multiboard)
  • Multiboard - Change the number of rows for Picking_MultiBoard[Player_Number] to 4
  • Multiboard - Change the number of columns for Picking_MultiBoard[Player_Number] to 2
  • Multiboard - Change the title of Picking_MultiBoard[Player_Number] to Hero Picking
Ok this should solve the problem. If not then I am an asshole who haven't checked it out.
 
Last edited:
Status
Not open for further replies.
Top