Damn... That's killing me. I've been looking at the screen for 10 minutes without knowing what to do. I'll edit this when I find a solution.
I hope it works. The following trigger sets players x y z to Players[1, 2, 3]. As example, if Player 1, 4, 5, 7, 9 are playing.
Players[1] = 1
Players[2] = 4
Players[3] = 5
Players[4] = 7
Players[5] = 9
So it creates 1 row for headers + 5 which are "PlayerPlaying"
-
After Init
-
Events
-
Time - Elapsed game time is 0.00 seconds
-
Conditions
-
Actions
-
Set TForce = (All players controlled by a User player)
-
Set PlayersPlaying = (Number of players in TForce)
-
Multiboard - Create a multiboard with 3 columns and (PlayersPlaying + 1) rows, titled Multiboard
-
Set MB = (Last created multiboard)
-
Player Group - Pick every player in TForce and do (Actions)
-
Loop - Actions
-
Set TInt = (TInt + 1)
-
Set Players[TInt] = (Picked player)
-
Multiboard - Show MB
-
Multiboard - Set the display style for MB item in column 0, row 0 to Show text and Hide icons
-
Multiboard - Set the display style for MB item in column 3, row 1 to Show text and Show icons
-
Multiboard - Set the icon for MB item in column 3, row 1 to UI\Feedback\Resources\ResourceGold.blp
-
Multiboard - Set the text for MB item in column 1, row 1 to Player
-
Multiboard - Set the text for MB item in column 2, row 1 to Kills
-
Multiboard - Set the text for MB item in column 3, row 1 to Income
-
Multiboard - Set the color for MB item in column 0, row 1 to (100.00%, 80.00%, 20.00%) with 0.00% transparency
-
Multiboard - Set the width for MB item in column 0, row 0 to 6.00% of the total screen width
-
Multiboard - Minimize MB
-
Multiboard - Maximize MB
-
For each (Integer A) from 1 to PlayersPlaying, do (Actions)
-
Loop - Actions
-
Multiboard - Set the text for MB item in column 1, row ((Integer A) + 1) to (Name of Players[(Integer A)])
-
Custom script: call DestroyForce(udg_TForce)
As you can see, it updates Row (Integer A + 1) since players are one row over their player number. But here we don't set the Rows based on the player number (since player 7 should be on row 8, we have it on row 4), but we set it based on the Players[Index] variable which has them in order.
-
Multiboard Kills
-
Events
-
Unit - A unit owned by Player 11 (Dark Green) Dies
-
Conditions
-
Actions
-
Set TInt = (Player number of (Owner of (Killing unit)))
-
Set CreepKills[TInt] = (CreepKills[TInt] + 1)
-
For each (Integer A) from 1 to PlayersPlaying, do (Actions)
-
Loop - Actions
-
Multiboard - Set the text for MB item in column 2, row ((Integer A) + 1) to (String(CreepKills[(Player number of Players[(Integer A)])]))
· As you can see, the loop goes from 1 to PlayersPlaying (In this example, we have 5 players so, it goes from 1 to 5)
· It updates the row ((Integer A) + 1) so, if A=1, it updates Row 2.
Players[1] = Row 2
Players[2] = Row 3
Players[3] = Row 4
Players[4] = Row 5
Players[5] = Row 6
· And sets the CreepKills of Player number of Players[(Integer A)]
Integer A=1 = CreepKills[Players[1]] = Player 1 = 1
Integer A=2 = CreepKills[Players[2]] = Player 4 = 4
Integer A=3 = CreepKills[Players[3]] = Player 5 = 5
Integer A=4 = CreepKills[Players[4]] = Player 7 = 7
Integer A=5 = CreepKills[Players[5]] = Player 9 = 9
So, it displays CreepKills[1, 4, 5, 7, 9] on rows [2, 3, 4, 5, 6] based on stored Players[1, 2, 3, 4, 5]
CreepKills[Index] is based on Player Number, but the Player Number is the Player Number of "Players[Index]", so we have to look also for the Index of "Players" variable, which we loop with Integer A.
Damn, I feel like I solved world hunger and child abuse... I think there must be a better way to do this, but I don't know how. You have to display the Income the same way I did the kills. But you can easily set Income[Player number] and CreepKils[Player number] based on the real player (1, 4, 5, 7, 9) Doesn't matter. You can also give the Bounty with no trouble using Income[Player number of Picked player] or [Player number of (Player(Integer A))]
To update the Income Multiboard data you have to use this
-
For each (Integer A) from 1 to PlayersPlaying, do (Actions)
-
Loop - Actions
-
Multiboard - Set the text for MB item in column 3, row ((Integer A) + 1) to (String(Income[(Player number of Players[(Integer A)])]))
· PlayersPlaying is an Integer Variable
· TForce is a Player Group variable
· Players[Index] is an Integer Variable Array.