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

[Trigger] having non-sequential player numbers on a multi-board

Status
Not open for further replies.
Level 6
Joined
Jan 8, 2009
Messages
140
I'm fine with creating multiboards, adding players to them and modifying the data displayed based on the player it is for but I have never figured out what to do if I don't add every player 1-12. If say only players 1,2,4,7,9 are playing i can create the multiboard with the correct number of rows, but If i want to modify say the kills of player 4 it isn't going to work, it'll modify the kills of player 7 because it's the fourth player on the board.

how can I go about adding players if there is gaps and how can I determine what particular row any given player is placed into so I can display information belonging to the correct player.
 
Level 15
Joined
Oct 18, 2008
Messages
1,588
You need something like:

  • Set I = 2
  • 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
          • -------- Check if player is a player and is alive --------
        • Then - Actions
          • -------- Add player to the multiboard row I --------
          • Set I = (I + 1)
Or at least something like that, haven't touched WE for a while ^^'
 
You would need to count rows per integer and give it's value to a specific player via custom variable.
  • Set Counter = 2
  • For each (Integer Int) from 1 to 12, do (Actions)
    • Schleifen - Aktionen
      • Set Player = (Player(Int))
      • If all conditions are true
        • If - Conditions
          • Player slot status = playing
        • Then - Actions
          • Set Counter = (Counter + 1)
          • Set Row_Player[Int] = Counter
          • Multiboard - Set the text for Multiboard item in column 1, row Row_Player[Int] to ((Name of Player)
          • Multiboard - Set the text for Multiboard item in column 2, row Row_Player[Int] to (DJ)
          • Multiboard - Set the text for Multiboard item in column 3, row Row_Player[Int] to (YOLOSWAG)
          • Multiboard - Set the text for Multiboard item in column 4, row Row_Player[Int] to (2013)
          • Else - Actions
Variables needed:
Player = player
Int, Counter = integer
Row_Player = integer [array]

The Int represents the player number of Player... we set Counter[Int] equal to the row where Player gets signed in.

So later you do not change in..
  • Multiboard - Set the text for Multiboard item in column X, row (Player number of Player) to YourValue
you need to do ..
  • Multiboard - Set the text for Multiboard item in column X, row (Row_Player[Player number of Player]) to YourValue
 
Status
Not open for further replies.
Top