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

Status
Not open for further replies.
Level 4
Joined
Jul 20, 2012
Messages
83
Hi there, I have a big issue with my Multiboard which I've always thought is fixed with every version of my map I release but there's still something missing that keeps it messed up and not working properly...

  • Create
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 4 columns and (3 + Game_NumberOfPlayers) rows, titled ((((Tickets: |cff0000ff + (String((Integer(Game_Tickets_Blue))))) + (|r-|cffff0000 + (String((Integer(Game_Tickets_Red)))))) + |r() + ((String(Multiboard_Hours)) + (: + ((String(Multiboard_Minutes)) + (: + ((String(Multiboard_Seconds)) + )))))))
      • Set Multiboard = (Last created multiboard)
      • Multiboard - Set the display style for Multiboard item in column 0, row 0 to Show text and Hide icons
      • Multiboard - Set the width for Multiboard item in column 1, row 0 to 15.00% of the total screen width
      • Multiboard - Set the width for Multiboard item in column 2, row 0 to 3.00% of the total screen width
      • Multiboard - Set the width for Multiboard item in column 3, row 0 to 4.50% of the total screen width
      • Multiboard - Set the width for Multiboard item in column 4, row 0 to 6.00% of the total screen width
      • Multiboard - Set the text for Multiboard item in column 1, row 1 to <Empty String>
      • Multiboard - Set the text for Multiboard item in column 2, row 1 to |cffffcc00Kills|r
      • Multiboard - Set the text for Multiboard item in column 3, row 1 to |cffffcc00Deaths|r
      • Multiboard - Set the text for Multiboard item in column 4, row 1 to |cffffcc00Creep Kil...
      • Multiboard - Set the text for Multiboard item in column 1, row 2 to |c000000ffBlue Team...
      • Multiboard - Set the text for Multiboard item in column 1, row (3 + Game_NumberOfPlayers_Blue) to |c00ff0000Red Team|...
      • Multiboard - Show Multiboard
      • Multiboard - Minimize Multiboard
      • Trigger - Run Refresh <gen> (checking conditions)
- creating Multiboard with Tickets text and the time text is working all right
- I wanted my Multiboard to show like this pattern:
<blank> Kills Deaths Creeps Kills
Blue Team
Player 1
Player 2
Player 3
Player 4
Player 5
Red Team
Other players in rows...

- then there go these:
  • Kills and Deaths
    • Events
      • Unit - A unit Dies
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Multiboard_Kills[(Player number of (Owner of (Killing unit)))] = (Multiboard_Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Set Multiboard_Deaths[(Player number of (Owner of (Triggering unit)))] = (Multiboard_Deaths[(Player number of (Owner of (Triggering unit)))] + 1)
      • Trigger - Run Refresh <gen> (checking conditions)
and...
  • Creep Kills
    • Events
      • Unit - A unit Dies
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Owner of (Triggering unit)) Equal to Neutral Hostile
          • ((Triggering unit) is A structure) Equal to False
    • Actions
      • Set Multiboard_CreepKills[(Player number of (Owner of (Killing unit)))] = (Multiboard_CreepKills[(Player number of (Owner of (Killing unit)))] + 1)
      • Trigger - Run Refresh <gen> (checking conditions)
And finally it's covered by the worst trigger ever... the Refresh:
  • Refresh
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 3 (Teal) slot status) Equal to Is playing
        • Then - Actions
          • Multiboard - Set the text for Multiboard item in column 1, row (2 + Multiboard_Blue[1]) to (Game_PlayerColor[3] + ((Name of Player 3 (Teal)) + |r))
          • Multiboard - Set the text for Multiboard item in column 2, row (2 + Multiboard_Blue[1]) to (String(Multiboard_Kills[3]))
          • Multiboard - Set the text for Multiboard item in column 3, row (2 + Multiboard_Blue[1]) to (String(Multiboard_Deaths[3]))
          • Multiboard - Set the text for Multiboard item in column 4, row (2 + Multiboard_Blue[1]) to (String(Multiboard_CreepKills[3]))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 7 (Green) slot status) Equal to Is playing
        • Then - Actions
          • Multiboard - Set the text for Multiboard item in column 1, row (2 + (Multiboard_Blue[1] + Multiboard_Blue[2])) to (Game_PlayerColor[7] + ((Name of Player 7 (Green)) + |r))
          • Multiboard - Set the text for Multiboard item in column 2, row (2 + (Multiboard_Blue[1] + Multiboard_Blue[2])) to (String(Multiboard_Kills[7]))
          • Multiboard - Set the text for Multiboard item in column 3, row (2 + (Multiboard_Blue[1] + Multiboard_Blue[2])) to (String(Multiboard_Deaths[7]))
          • Multiboard - Set the text for Multiboard item in column 4, row (2 + (Multiboard_Blue[1] + Multiboard_Blue[2])) to (String(Multiboard_CreepKills[7]))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 9 (Gray) slot status) Equal to Is playing
        • Then - Actions
          • Multiboard - Set the text for Multiboard item in column 1, row (2 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + Multiboard_Blue[3]))) to (Game_PlayerColor[9] + ((Name of Player 9 (Gray)) + |r))
          • Multiboard - Set the text for Multiboard item in column 2, row (2 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + Multiboard_Blue[3]))) to (String(Multiboard_Kills[9]))
          • Multiboard - Set the text for Multiboard item in column 3, row (2 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + Multiboard_Blue[3]))) to (String(Multiboard_Deaths[9]))
          • Multiboard - Set the text for Multiboard item in column 4, row (2 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + Multiboard_Blue[3]))) to (String(Multiboard_CreepKills[9]))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 10 (Light Blue) slot status) Equal to Is playing
        • Then - Actions
          • Multiboard - Set the text for Multiboard item in column 1, row (2 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + Multiboard_Blue[4])))) to (Game_PlayerColor[10] + ((Name of Player 10 (Light Blue)) + |r))
          • Multiboard - Set the text for Multiboard item in column 2, row (2 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + Multiboard_Blue[4])))) to (String(Multiboard_Kills[10]))
          • Multiboard - Set the text for Multiboard item in column 3, row (2 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + Multiboard_Blue[4])))) to (String(Multiboard_Deaths[10]))
          • Multiboard - Set the text for Multiboard item in column 4, row (2 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + Multiboard_Blue[4])))) to (String(Multiboard_CreepKills[10]))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 11 (Dark Green) slot status) Equal to Is playing
        • Then - Actions
          • Multiboard - Set the text for Multiboard item in column 1, row (2 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + Multiboard_Blue[5]))))) to (Game_PlayerColor[11] + ((Name of Player 11 (Dark Green)) + |r))
          • Multiboard - Set the text for Multiboard item in column 2, row (2 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + Multiboard_Blue[5]))))) to (String(Multiboard_Kills[11]))
          • Multiboard - Set the text for Multiboard item in column 3, row (2 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + Multiboard_Blue[5]))))) to (String(Multiboard_Deaths[11]))
          • Multiboard - Set the text for Multiboard item in column 4, row (2 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + Multiboard_Blue[5]))))) to (String(Multiboard_CreepKills[11]))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 4 (Purple) slot status) Equal to Is playing
        • Then - Actions
          • Multiboard - Set the text for Multiboard item in column 1, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + Multiboard_Red[1])))))) to (Game_PlayerColor[4] + ((Name of Player 4 (Purple)) + |r))
          • Multiboard - Set the text for Multiboard item in column 2, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + Multiboard_Red[1])))))) to (String(Multiboard_Kills[4]))
          • Multiboard - Set the text for Multiboard item in column 3, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + Multiboard_Red[1])))))) to (String(Multiboard_Deaths[4]))
          • Multiboard - Set the text for Multiboard item in column 4, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + Multiboard_Red[1])))))) to (String(Multiboard_CreepKills[4]))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 5 (Yellow) slot status) Equal to Is playing
        • Then - Actions
          • Multiboard - Set the text for Multiboard item in column 1, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + (Multiboard_Red[1] + Multiboard_Red[2]))))))) to (Game_PlayerColor[5] + ((Name of Player 5 (Yellow)) + |r))
          • Multiboard - Set the text for Multiboard item in column 2, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + (Multiboard_Red[1] + Multiboard_Red[2]))))))) to (String(Multiboard_Kills[5]))
          • Multiboard - Set the text for Multiboard item in column 3, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + (Multiboard_Red[1] + Multiboard_Red[2]))))))) to (String(Multiboard_Deaths[5]))
          • Multiboard - Set the text for Multiboard item in column 4, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + (Multiboard_Red[1] + Multiboard_Red[2]))))))) to (String(Multiboard_CreepKills[5]))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 6 (Orange) slot status) Equal to Is playing
        • Then - Actions
          • Multiboard - Set the text for Multiboard item in column 1, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + (Multiboard_Red[1] + (Multiboard_Red[2] + Multiboard_Red[3])))))))) to (Game_PlayerColor[6] + ((Name of Player 6 (Orange)) + |r))
          • Multiboard - Set the text for Multiboard item in column 2, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + (Multiboard_Red[1] + (Multiboard_Red[2] + Multiboard_Red[3])))))))) to (String(Multiboard_Kills[6]))
          • Multiboard - Set the text for Multiboard item in column 3, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + (Multiboard_Red[1] + (Multiboard_Red[2] + Multiboard_Red[3])))))))) to (String(Multiboard_Deaths[6]))
          • Multiboard - Set the text for Multiboard item in column 4, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + (Multiboard_Red[1] + (Multiboard_Red[2] + Multiboard_Red[3])))))))) to (String(Multiboard_CreepKills[6]))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 8 (Pink) slot status) Equal to Is playing
        • Then - Actions
          • Multiboard - Set the text for Multiboard item in column 1, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + (Multiboard_Red[1] + (Multiboard_Red[2] + (Multiboard_Red[3] + Multiboard_Red[4]))))))))) to (Game_PlayerColor[8] + ((Name of Player 8 (Pink)) + |r))
          • Multiboard - Set the text for Multiboard item in column 2, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + (Multiboard_Red[1] + (Multiboard_Red[2] + (Multiboard_Red[3] + Multiboard_Red[4]))))))))) to (String(Multiboard_Kills[8]))
          • Multiboard - Set the text for Multiboard item in column 3, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + (Multiboard_Red[1] + (Multiboard_Red[2] + (Multiboard_Red[3] + Multiboard_Red[4]))))))))) to (String(Multiboard_Deaths[8]))
          • Multiboard - Set the text for Multiboard item in column 4, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + (Multiboard_Red[1] + (Multiboard_Red[2] + (Multiboard_Red[3] + Multiboard_Red[4]))))))))) to (String(Multiboard_CreepKills[8]))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 12 (Brown) slot status) Equal to Is playing
        • Then - Actions
          • Multiboard - Set the text for Multiboard item in column 1, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + (Multiboard_Red[1] + (Multiboard_Red[2] + (Multiboard_Red[3] + (Multiboard_Red[4] + Multiboard_Red[5])))))))))) to (Game_PlayerColor[12] + ((Name of Player 12 (Brown)) + |r))
          • Multiboard - Set the text for Multiboard item in column 2, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + (Multiboard_Red[1] + (Multiboard_Red[2] + (Multiboard_Red[3] + (Multiboard_Red[4] + Multiboard_Red[5])))))))))) to (String(Multiboard_Kills[12]))
          • Multiboard - Set the text for Multiboard item in column 3, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + (Multiboard_Red[1] + (Multiboard_Red[2] + (Multiboard_Red[3] + (Multiboard_Red[4] + Multiboard_Red[5])))))))))) to (String(Multiboard_Deaths[12]))
          • Multiboard - Set the text for Multiboard item in column 4, row (3 + (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + (Multiboard_Blue[5] + (Multiboard_Red[1] + (Multiboard_Red[2] + (Multiboard_Red[3] + (Multiboard_Red[4] + Multiboard_Red[5])))))))))) to (String(Multiboard_CreepKills[12]))
        • Else - Actions
I made it like this because I wanted it when not full game is played not showing 13 rows and a few of them really used by players, others blank...
So I made this variable called Multiboard_Blue and Multiboard_Red with arrays to store more number into one var... These vars are integer numbers of 1 or 0 value and they change according to each player slot used to count how many rows it can have and what spots should players take after each other...
Notice that I haven't used standard player colors order (Red, Blue, Teal, Purple) but it's in the condition...

When I start testing my map in single player it shows Blue Team, under it my name in Teal who is host and after me goes row with Red Team title, working like it should, but only for single player, when I try playing over internet like I did with 3 other players it shows like Blue Team, under it Green Player and under it Green Player again with same stat info and then there's nothing else, end of story...

I'm desperate, I don't know how to do a simple multiboard, the tutorial didn't help me much... That's why I'm asking you guys to help me please, and thanks for reading it completely...
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
  • (Multiboard_Blue[1] + (Multiboard_Blue[2] + (Multiboard_Blue[3] + (Multiboard_Blue[4] + Multiboard_Blue[5])
This is terrible and unnecessary, and probably where your problem lies.

Save each player's multiboard position to an array integer, let's call it PlayerPosition.
So PlayerPosition[3] (teal) = 3
PlayerPosition[4] (purple) = 9
PlayerPosition[5] (yellow) = 4
PlayerPosition[6] = 10
and so on.

In your refresh trigger, instead of referencing the rows as you are, use row number PlayerPosition[player number of player].

Also, all of that hard work can be simplified further to:
  • Player group - pick every player in all players and do actions:
    • Loop - actions
      • If then else multiple functions
        • If - conditions
          • ((Picked player) slot status) equal to is playing
        • Then - actions
          • Multiboard - Multiboard - Set the text for Multiboard item in column 4, row (PlayerPosition[Player number of (picked player)]) to (String(Multiboard_CreepKills[player number of (picked player)]))
PS: please put
tags around your triggers, I have to scroll sideways :/
 
Level 4
Joined
Jul 20, 2012
Messages
83
That's the problem, I don't want to have a certain player his spot, that's why I made that terrible and long function... For example, player 1 and 2 in Blue Team and player 10 from Red Team are playing the game... I want rows Red Team and player 10 to be right under the other two players not in row 10 and 11... those rows between playing players mustn't be blank according to my plan...
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
That's the problem, I don't want to have a certain player his spot, that's why I made that terrible and long function... For example, player 1 and 2 in Blue Team and player 10 from Red Team are playing the game... I want rows Red Team and player 10 to be right under the other two players not in row 10 and 11... those rows between playing players mustn't be blank according to my plan...

That's the point - you can change the PlayerPosition[] variable to change the player's row position.
 
Status
Not open for further replies.
Top