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

[Solved] How can i detect this stupid thing? It is for my unsolved Multiboard.

Level 18
Joined
Jun 2, 2009
Messages
1,233
Here is the few examples.

IF P4 is in the game and P3 NOT in the game
Tell the triggers that Player 4 = PLAYER 1

IF P3 and P5 are in the game.
Tell the triggers that
P3 = P1
P4 = P2

IF P3 P5 and P5 are in the game
Tell the triggers that
P3 = P1
P5 = P2
P6 = P3

This is for my unsolved multiboard (since 2 months i haven't created multiboard, yes...)

I can sort the players but not as i think. I can detect their location on the board but if it is player 8, it stays at according slot.
But there are no player 7 in the game, so it should count as 7. Or at least in the board.

Team 1
1, 3, 4, 5, 6, 7
VS
2, 8, 9, 10, 11, 12

How can i do that?
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
First you should be storing all of your Players in different Player Groups:
  • Multiboard Create Teams
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- Team Numbers start at 0 and represent the player's Force (see Force Properties). --------
      • -------- Team Number 0 = Force 1, Team Number 1 = Force 2, Team Number 2 = Force 3, etc... --------
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Picked player) controller) Equal to User
                  • ((Picked player) controller) Equal to Computer
              • ((Picked player) slot status) Equal to Is playing
            • Then - Actions
              • -------- Active Players In Your Team: --------
              • Player Group - Add (Picked player) to MB_Teams[(Team number of (Picked player))]
              • -------- --------
              • -------- All Active Players: --------
              • Player Group - Add (Picked player) to MB_Teams[2]
            • Else - Actions
Make sure your MB_Teams array variable has it's Size set to a large enough number in order to support the number of teams (Forces) your map uses.
Set this value inside of the Variable Editor!

MB_Teams[0] = All players in Force 1.
MB_Teams[1] = All players in Force 2.
MB_Teams[2] = All players in Force 1 + Force 2 combined.

Then use those Teams to create the Multiboard:
  • Multiboard Create Board
    • Events
      • Time - Elapsed game time is 0.02 seconds
    • Conditions
    • Actions
      • -------- Total Player Count: --------
      • Set MB_Int[0] = (Number of players in MB_Teams[0])
      • Set MB_Int[1] = (Number of players in MB_Teams[1])
      • -------- --------
      • -------- Number of Rows: --------
      • Set MB_Int[2] = (2 + (MB_Int[0] + MB_Int[1]))
      • -------- --------
      • -------- Number of Columns: --------
      • Set MB_Int[3] = 4
      • -------- --------
      • -------- Your Columns Categories: --------
      • Set MB_COL_Name = 1
      • Set MB_COL_Kills = 2
      • Set MB_COL_Deaths = 3
      • Set MB_COL_Assists = 4
      • -------- --------
      • -------- Create the actual Multiboard: --------
      • Multiboard - Create a multiboard with MB_Int[3] columns and MB_Int[2] rows, titled My Map.
      • Set MB_Board = (Last created multiboard)
      • -------- --------
      • -------- Name, Kills, Deaths, Assists: --------
      • Multiboard - Set the text for MB_Board item in column MB_COL_Name, row 1 to Name
      • Multiboard - Set the text for MB_Board item in column MB_COL_Kills, row 1 to Kills
      • Multiboard - Set the text for MB_Board item in column MB_COL_Deaths, row 1 to Deaths
      • Multiboard - Set the text for MB_Board item in column MB_COL_Assists, row 1 to Assists
      • -------- --------
      • -------- Settings: --------
      • -------- Loop over each Column --------
      • For each (Integer MB_Int[5]) from 1 to MB_Int[3], do (Actions)
        • Loop - Actions
          • -------- Loop over each Row --------
          • For each (Integer MB_Int[4]) from 1 to MB_Int[2], do (Actions)
            • Loop - Actions
              • -------- Hide all icons: --------
              • Multiboard - Set the display style for MB_Board item in column MB_Int[5], row MB_Int[4] to Show text and Hide icons
              • -------- Kills, Deaths, Assists are smaller: --------
              • Multiboard - Set the width for MB_Board item in column MB_Int[5], row MB_Int[4] to 6.00% of the total screen width
              • -------- Name is bigger: --------
              • Multiboard - Set the width for MB_Board item in column MB_COL_Name, row MB_Int[4] to 11.00% of the total screen width
      • -------- --------
      • -------- Add Team 1: --------
      • Set MB_Int[4] = 1
      • Player Group - Pick every player in MB_Teams[0] and do (Actions)
        • Loop - Actions
          • Set MB_Int[4] = (MB_Int[4] + 1)
          • -------- --------
          • Set MB_Player_ID = (Player number of (Picked player))
          • Set MB_Player_ROW[MB_Player_ID] = MB_Int[4]
          • -------- --------
          • Multiboard - Set the text for MB_Board item in column MB_COL_Name, row MB_Int[4] to (Name of (Picked player))
          • Multiboard - Set the text for MB_Board item in column MB_COL_Kills, row MB_Int[4] to 0
          • Multiboard - Set the text for MB_Board item in column MB_COL_Deaths, row MB_Int[4] to 0
          • Multiboard - Set the text for MB_Board item in column MB_COL_Assists, row MB_Int[4] to 0
      • -------- --------
      • -------- Add Team 2: --------
      • Set MB_Int[4] = (MB_Int[4] + 1)
      • Player Group - Pick every player in MB_Teams[1] and do (Actions)
        • Loop - Actions
          • Set MB_Int[4] = (MB_Int[4] + 1)
          • -------- --------
          • Set MB_Player_ID = (Player number of (Picked player))
          • Set MB_Player_ROW[MB_Player_ID] = MB_Int[4]
          • -------- --------
          • Multiboard - Set the text for MB_Board item in column MB_COL_Name, row MB_Int[4] to (Name of (Picked player))
          • Multiboard - Set the text for MB_Board item in column MB_COL_Kills, row MB_Int[4] to 0
          • Multiboard - Set the text for MB_Board item in column MB_COL_Deaths, row MB_Int[4] to 0
          • Multiboard - Set the text for MB_Board item in column MB_COL_Assists, row MB_Int[4] to 0
      • -------- --------
      • Multiboard - Hide MB_Board
      • Multiboard - Show MB_Board
In this example we're using two Teams like you'd see in your typical MOBA or Castle Wars style map, but this can easily be edited to support any number of Teams.

Now you can add Kills to the Multiboard with a few simple Actions:
  • DEMO Add Kills
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set MB_Player_ID = (Player number of (Owner of (Killing unit)))
      • Set Demo_Player_Kills[MB_Player_ID] = (Demo_Player_Kills[MB_Player_ID] + 1)
      • Multiboard - Set the text for MB_Board item in column MB_COL_Kills, row MB_Player_ROW[MB_Player_ID] to (String(Demo_Player_Kills[MB_Player_ID]))
Do the same with Deaths, Assists, etc...

Here are all of the Variables I used:
1736359322864.png

You don't NEED the Demo stuff.
 

Attachments

  • Multiboard 1.w3m
    25.2 KB · Views: 7
Last edited:
Top