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

Multiboard help.

Status
Not open for further replies.
Level 12
Joined
Dec 2, 2016
Messages
733
  • Human Multiboard
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set HumansCurrentlyPlaying = 10
      • Set VampiresCurrentlyPlaying = 2
      • For each (Integer A) from 1 to (HumansCurrentlyPlaying + VampiresCurrentlyPlaying), do (Actions)
        • Loop - Actions
          • Multiboard - Create a multiboard with 4 columns and ((Integer A) + 2) rows, titled |CFFFFFFFFGame time...
          • Multiboard - Set the width for (Last created multiboard) item in column 0, row 0 to 5.00% of the total screen width
          • Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
          • Multiboard - Set the text for (Last created multiboard) item in column 0, row 0 to 0
          • Multiboard - Set the text for (Last created multiboard) item in column 4, row 0 to -
          • -------- Icon setup --------
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 1 to ReplaceableTextures\CommandButtons\BTNPeasant.blp
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row (2 + HumansCurrentlyPlaying) to ReplaceableTextures\CommandButtons\BTNMetamorphosis.blp
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row 1 to Hide text and Show icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row (2 + HumansCurrentlyPlaying) to Hide text and Show icons
          • -------- Icon setup end --------
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Humans
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Gold
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to Lumber
          • Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to Fed
          • -------- 10 spacing for humans --------
          • Multiboard - Set the width for (Last created multiboard) item in column 1, row 0 to 10.00% of the total screen width
          • -------- 10 spacing for humans end --------
          • -------- Start for declaring human slots --------
          • -------- End for declaring human slots --------
          • -------- Vampire Set up below --------
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row (2 + HumansCurrentlyPlaying) to Vampires
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row (2 + HumansCurrentlyPlaying) to Gold
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row (2 + HumansCurrentlyPlaying) to Lumber
          • Multiboard - Set the text for (Last created multiboard) item in column 4, row (2 + HumansCurrentlyPlaying) to Leaked
          • Multiboard - Set the text for (Last created multiboard) item in column 4, row (3 + HumansCurrentlyPlaying) to -
      • For each (Integer A) from 2 to (HumansCurrentlyPlaying + 1), do (Actions)
        • Loop - Actions
          • If (((Player(((Player number of (Player((Integer A)))) - 1))) is in Humans) Equal to True) then do (Multiboard - Set the text for (Last created multiboard) item in column 1, row (Integer A) to (Name of (Player(((Player number of (Player((Integer A)))) - 1))))) else do (Do nothing)
      • For each (Integer A) from (3 + HumansCurrentlyPlaying) to (HumansCurrentlyPlaying + (VampiresCurrentlyPlaying + 3)), do (Actions)
        • Loop - Actions
          • If (((Player((Integer A))) is in Vampires) Equal to True) then do (Multiboard - Set the text for (Last created multiboard) item in column 1, row (Integer A) to (Name of (Player((Integer A))))) else do (Do nothing)
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 13 to Test1
      • Set Multiboard = (Last created multiboard)
      • Multiboard - Minimize (Last created multiboard)


So what I'm trying to accomplish is that. We have two variables, humans playing and vamps playing. They dictacte how many rows are made which that part is working. Filling in the first column row with the right player names not so much. My brain is literally melting right now trying to get this to work.

Basically I plan that whenever a player dies or switches teams I'll recreate the multiboard with the new rows. What I'm having an issue with is putting the correct player names in each row, I tried using a for loop but it's getting so complicated that I don't know what to do now. And it's using the int A as a player index which I now realize isn't going to work. Is there a better way to properly put the right player names in each slot?

I've been at this for hours D:

Picture of the leaderboard with code above ^: Gyazo - 89a7c2fc9617fcd312595e50686109bb.jpg


Now if I make say my human a vampire, place him in the vampire group and make the humans currently playing value 9 instead of 10 leaderboard looks like this: Gyazo - e65551c0ffb925ae7a393a49f5eae150.jpg
 
Status
Not open for further replies.
Top