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

Color rows on multiboard?

Status
Not open for further replies.
Level 12
Joined
Dec 2, 2016
Messages
733
  • Multiboard update
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 2 to (HumansCurrentlyPlaying + 1), do (Actions)
        • Loop - Actions
          • Multiboard - Set the text for HumanMultiboardVariable item in column 1, row (Integer A) to (Name of HumanArrayMulti[MultiBoardResetCount])
          • Multiboard - Set the color for HumanMultiboardVariable item in column 1, row (Integer A) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
          • Multiboard - Set the text for HumanMultiboardVariable item in column 2, row (Integer A) to (String((HumanArrayMulti[MultiBoardResetCount] Current gold)))
          • Multiboard - Set the text for HumanMultiboardVariable item in column 3, row (Integer A) to (String((HumanArrayMulti[MultiBoardResetCount] Current lumber)))
Is there a way to set the row to the color of player[IntA] ?

This is only part of the multiboard trigger. But I've got it set up so that it sorts players in order of colors. Like Red will be at the top, then blue, teal etc. And if lets say it was

Red
Blue
[Teal not playing]
Green

The multiboard will show
Red
Blue
Green

So I got the names showing correctly, but I need to add colors to them. Not sure how to go about that without having a bunch of if statements checking if that row belongs to X player. Or is that my only option?
 
Level 13
Joined
May 10, 2009
Messages
868
Unfortunately, there's no native function that gets which color is set to each row and column. Also, why exactly player color, and not their number?

If you want to make that multiboard displaying players dynamically (showing playing players only), and be sorted by colors. Then, you'll have to keep track of each row, and store in an array (integer) which player is occupying that row ("slot"); Also, when a player leaves the game, the "row position" for the rest of them should be adjusted. For example, imagine that players from 1 to 10 are currently playing the game, and then player 5 abandons the match. These players: 6, 7, 8, 9, and 10, will now be in the incorrect "slot" (row and column), and you should move their position to the previous one. (6 moves to 5; 7 moves to 6, etc...)
 
Status
Not open for further replies.
Top