• 🏆 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] Multiboard Death problem

Status
Not open for further replies.
Level 2
Joined
Nov 4, 2009
Messages
18
I made a multiboard from a tutorial, i added Deaths the same way as Kills, but in a different column, but it changes the kills, kills number and the death number to 1. How can i solve this??? +rep

  • Multiboard
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set Player_Count = (Number of players in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing))))
      • Multiboard - Create a multiboard with 4 columns and (1 + Player_Count) rows, titled Dota Test
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Player Name
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to Kills
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to Deaths
      • For each (Integer A) from 1 to (1 + Player_Count), do (Actions)
        • Loop - Actions
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row 1 to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 2, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 3, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 4, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 2.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 8.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 4.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 4, row (Integer A) to 5.00% of the total screen width
      • Set List = 2
      • Player Group - Pick every player in (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) controller) Equal to User))) and do (Actions)
        • Loop - Actions
          • Set Multiboard_Spots[(Player number of (Picked player))] = List
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row List to Player_Colour[((Player number of (Picked player)) + (Integer(((Name of (Picked player)) + |r))))]
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row List to 0
          • Multiboard - Set the text for (Last created multiboard) item in column 4, row List to 0
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row List to ReplaceableTextures\WorldEditUI\Editor-Ally-HighPriority.blp
          • Set List = (List + 1)
      • Multiboard - Show (Last created multiboard)
  • Player Deaths
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Owner of (Dying unit)) controller) Equal to User
    • Actions
      • Set Death_Count[(Player number of (Owner of (Dying unit)))] = (Death_Count[(Player number of (Owner of (Dying unit)))] + 1)
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row Multiboard_Spots[(Player number of (Owner of (Dying unit)))] to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Row 1 is reserved to the kills, deaths, player name strings, right?

  • Multiboard - Set the text for (Last created multiboard) item in column 4, row Multiboard_Spots[(Player number of (Owner of (Dying unit)))] to (String(Death_Count[(Player number of (Owner of (Dying unit)))]))
If P1 triggers this, then row 1 gets modified. You need to use player number + 1 for the row.
 
Last edited:
Level 18
Joined
Jan 21, 2006
Messages
2,552
  • Player_Colour[ ((Player number of (Picked player)) + (Integer(((Name of (Picked player)) + |r)))) ]
What the heck is this? Why is "+ |r" inside the array parameter? Why are you converting the name of the player to an integer?
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
This still makes no sense:

  • Integer(((Name of (Picked player)) + |r))
Also converting a player's name to an integer will just return 0, unless the player's name has an integer at the beginning of it in which case it will return that integer. Your array look-up is all wrong.
 
Status
Not open for further replies.
Top