• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

how to set up Muiltiboard player positions

Status
Not open for further replies.
Level 15
Joined
Jul 9, 2008
Messages
1,552
alright so i have a basic muiltiboard set up atm that is set up as:

muiltboard.png


i want to change this so that if a player isnt playing the row is not displayed in the muiltiboard e.g the pic above would only display
name kills death unit kill
footmen 0 0 0
worldedit 0 0 0
grunt 0 0 0



iv got the set up for number of rows created right by using

  • Multiboard - Create a multiboard with 4 columns and ((Number of players in Human) + ((Number of players in Orc) + 3)) rows, titled HERO kill/death and unit kills
but the problem im havving is getting the right row the players are in to update.
im using arrays as e.g kills[player number of owner of killing unit] witch is fine all tho

  • --for human--
  • Multiboard - Set the text for (Last created multiboard) item in column 2, row ((Player number of (Owner of (Attacking unit))) + 1) to (String(kills[player number of killing unit])
  • --then for grunts--
  • Multiboard - Set the text for (Last created multiboard) item in column 2, row ((Player number of (Owner of (Attacking unit))) + 3) to (String(kills[player number of killing unit])
this will not work for the rows when e.g player 1 is not playing, so player 2 will take player 1s pos in the muiltiboard so then the trigger will update player 2s kills in the player 3 position


how can i keep track of the players rows properly for if the players above/below arnt playing
 
You create an integer array which you use to write on the multiboard.
This array saves for each player on its playernumber the multiboard row this player uses.

Multiboard - Set the text for (Last created multiboard) item in column 2, row ((Player number of (Owner of (Attacking unit))) + 1) to (String(kills[player number of killing unit])
->
Multiboard - Set the text for (Last created multiboard) item in column 2, row MultiboardPos[((Player number of (Owner of (Attacking unit))))] to (String(kills[player number of killing unit])

MultiboardPos has to be created manually according to the multiboards wanted layout by looping all players and saving current wanted row for the picked player, I do that before i create the board, to precalc the needed rows which then are used.

example of simple multiboard showing playernumber of playing players without spaces between

  • Multiboard creation
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set Index = 0
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set Index = (Index + 1)
          • Set MultiboardPos[(Player number of (Picked player))] = Index
      • Multiboard - Create a multiboard with 1 columns and Index rows, titled tesz
      • Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row MultiboardPos[(Player number of (Picked player))] to (String((Player number of (Picked player))))
      • Multiboard - Show (Last created multiboard)
 
Status
Not open for further replies.
Top