• 🏆 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 (leakcheck)

Status
Not open for further replies.
Level 4
Joined
Dec 8, 2007
Messages
86
I just began using Multiboards (well... using them seriously now)
As this is one of my first Multiboards (with many rows and columns, and for several players)

Now, i wanna know if theese triggers will work...

  • Create Multiboard
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set Multiboard[(Player number of (Picked player))] = (Last created multiboard)
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Multiboard - Set the text for Multiboard[(Integer A)] item in column 2, row (Integer A) to 0
          • Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 10.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 5.00% of the total screen width
          • Multiboard - Set the display style for Multiboard[(Integer A)] item in column 1, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for Multiboard[(Integer A)] item in column 2, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the text for Multiboard[(Integer A)] item in column 1, row 1 to (Name of (Player((Integer A))))
          • Multiboard - Set the text for Multiboard[(Integer A)] item in column 2, row 1 to Statistics
          • Multiboard - Minimize Multiboard[(Integer A)]
          • Multiboard - Maximize Multiboard[(Integer A)]
          • Multiboard - Set the text for Multiboard[(Integer A)] item in column 1, row 10 to No Hero
          • Multiboard - Set the icon for Multiboard[(Integer A)] item in column 2, row 10 to ReplaceableTextures\WorldEditUI\Editor-MultipleUnits.blp
          • Multiboard - Set the display style for Multiboard[(Integer A)] item in column 2, row 10 to Hide text and Show icons
  • Update Multiboard
    • Events
      • Time - Elapsed game time is 0.50 seconds
    • Conditions
    • Actions
      • 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
              • ((Picked player) slot status) Equal to Is playing
            • Then - Actions
              • Multiboard - Set the text for Multiboard[(Player number of (Picked player))] item in column 2, row 3 to (Substring((String((Percentage life of Hero[(Player number of (Picked player))]))), 1, 4))
              • Multiboard - Set the text for Multiboard[(Player number of (Picked player))] item in column 2, row 4 to (Substring((String((Percentage mana of Hero[(Player number of (Picked player))]))), 1, 4))
              • Multiboard - Set the text for Multiboard[(Player number of (Picked player))] item in column 2, row 5 to (Substring((String((Agility of Hero[(Player number of (Picked player))] (Exclude bonuses)))), 1, 4))
              • Multiboard - Set the text for Multiboard[(Player number of (Picked player))] item in column 2, row 6 to (Substring((String((Strength of Hero[(Player number of (Picked player))] (Exclude bonuses)))), 1, 4))
              • Multiboard - Set the text for Multiboard[(Player number of (Picked player))] item in column 2, row 7 to (Substring((String((Intelligence of Hero[(Player number of (Picked player))] (Exclude bonuses)))), 1, 4))
              • Multiboard - Set the text for Multiboard[(Player number of (Picked player))] item in column 2, row 8 to (Substring((String(GoldSpent[(Player number of (Picked player))])), 1, 7))
              • Multiboard - Set the text for Multiboard[(Player number of (Picked player))] item in column 2, row 9 to (Substring((String(StatsSpent[(Player number of (Picked player))])), 1, 5))
            • Else - Actions
 
Level 4
Joined
Dec 8, 2007
Messages
86
I've tested it now and i've changed 1 thing (hopefully it'll work now)...

And as for the Variable (Multiboard) i intend to create individual Multiboards (as the statistics would show your own stats and now your combined)...
 
Level 4
Joined
Dec 8, 2007
Messages
86
I've read through the Guide Inverted made and still i don't really know how to make my multiboard (though it prolly is something wrong in the code somewhere) i've atleast tried... thuz why i ask for help in Hive...
 
Ok, to make it work for each player, you have to create the multiboards in the loop you assign them to the variables. When you show the multiboards you have to put the following custom script in:

if GetLocalPlayer() == udg_TempPlayer then
<show multiboard here>
endif

You need to set a variable called TempPlayer to the player you want to show the multiboard to.

I hope I helped.
 
Level 4
Joined
Dec 8, 2007
Messages
86
I've done what you said... will try this out very soon...

  • Show MBs
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from (Player number of Player 1 (Red)) to (Player number of Player 10 (Light Blue)), do (Actions)
        • Loop - Actions
          • Set TempPlayer = (Player((Integer A)))
          • Multiboard - Hide all multiboards
          • Custom script: if GetLocalPlayer() == udg_TempPlayer then
          • Multiboard - Show Multiboard[(Player number of (Player((Integer A))))]
          • Custom script: endif
Is that correct?
 
Level 4
Joined
Dec 8, 2007
Messages
86
Let me see... (i guess i didnt) since it didn't show after 1 second...

  • Create Multiboard
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 1 (Red))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 2 (Blue))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 3 (Teal))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 4 (Purple))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 5 (Yellow))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 6 (Orange))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 7 (Green))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 8 (Pink))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 9 (Gray))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 10 (Light Blue))] = (Last created multiboard)
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Multiboard - Set the text for Multiboard[(Integer A)] item in column 2, row (Integer A) to 0
          • Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 10.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 5.00% of the total screen width
          • Multiboard - Set the display style for Multiboard[(Integer A)] item in column 1, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for Multiboard[(Integer A)] item in column 2, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the text for Multiboard[(Integer A)] item in column 1, row 1 to (Name of (Player((Integer A))))
          • Multiboard - Set the text for Multiboard[(Integer A)] item in column 2, row 1 to Statistics
          • Multiboard - Minimize Multiboard[(Integer A)]
          • Multiboard - Maximize Multiboard[(Integer A)]
          • Multiboard - Set the text for Multiboard[(Integer A)] item in column 1, row 10 to No Hero
          • Multiboard - Set the icon for Multiboard[(Integer A)] item in column 2, row 10 to ReplaceableTextures\WorldEditUI\Editor-MultipleUnits.blp
          • Multiboard - Set the display style for Multiboard[(Integer A)] item in column 2, row 10 to Hide text and Show icons

  • Update Multiboard
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • 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
              • ((Picked player) slot status) Equal to Is playing
            • Then - Actions
              • Multiboard - Set the text for Multiboard[(Player number of (Picked player))] item in column 2, row 2 to (String(Kills[(Player number of (Picked player))]))
              • Multiboard - Set the text for Multiboard[(Player number of (Picked player))] item in column 2, row 3 to ((Substring((String((Percentage life of Hero[(Player number of (Picked player))]))), 1, 4)) + %)
              • Multiboard - Set the text for Multiboard[(Player number of (Picked player))] item in column 2, row 3 to ((Substring((String((Percentage mana of Hero[(Player number of (Picked player))]))), 1, 4)) + %)
              • Multiboard - Set the text for Multiboard[(Player number of (Picked player))] item in column 2, row 5 to (Substring((String((Agility of Hero[(Player number of (Picked player))] (Exclude bonuses)))), 1, 4))
              • Multiboard - Set the text for Multiboard[(Player number of (Picked player))] item in column 2, row 6 to (Substring((String((Strength of Hero[(Player number of (Picked player))] (Exclude bonuses)))), 1, 4))
              • Multiboard - Set the text for Multiboard[(Player number of (Picked player))] item in column 2, row 7 to (Substring((String((Intelligence of Hero[(Player number of (Picked player))] (Exclude bonuses)))), 1, 4))
              • Multiboard - Set the text for Multiboard[(Player number of (Picked player))] item in column 2, row 8 to (Substring((String(GoldSpent[(Player number of (Picked player))])), 1, 7))
              • Multiboard - Set the text for Multiboard[(Player number of (Picked player))] item in column 2, row 9 to (Substring((String(StatsSpent[(Player number of (Picked player))])), 1, 5))
            • Else - Actions
That's how the triggers look like now...

**Edit**
Just noticed a couple of things that where prolly the reason for it to now work...
changed the trigger and here it is...
  • Create Multiboard
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 1 (Red))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 2 (Blue))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 3 (Teal))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 4 (Purple))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 5 (Yellow))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 6 (Orange))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 7 (Green))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 8 (Pink))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 9 (Gray))] = (Last created multiboard)
      • Multiboard - Create a multiboard with 2 columns and 10 rows, titled Statistics
      • Set Multiboard[(Player number of Player 10 (Light Blue))] = (Last created multiboard)
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • For each (Integer B) from (Player number of Player 1 (Red)) to (Player number of Player 10 (Light Blue)), do (Actions)
            • Loop - Actions
              • Multiboard - Set the text for Multiboard[(Integer B)] item in column 2, row (Integer A) to 0
              • Multiboard - Set the width for Multiboard[(Integer B)] item in column 1, row (Integer A) to 10.00% of the total screen width
              • Multiboard - Set the width for Multiboard[(Integer B)] item in column 2, row (Integer A) to 5.00% of the total screen width
              • Multiboard - Set the display style for Multiboard[(Integer B)] item in column 1, row (Integer A) to Show text and Hide icons
              • Multiboard - Set the display style for Multiboard[(Integer B)] item in column 2, row (Integer A) to Show text and Hide icons
              • Multiboard - Set the text for Multiboard[(Integer B)] item in column 1, row 1 to (Name of (Player((Integer B))))
              • Multiboard - Set the text for Multiboard[(Integer B)] item in column 2, row 1 to Statistics
              • Multiboard - Minimize Multiboard[(Integer B)]
              • Multiboard - Maximize Multiboard[(Integer B)]
              • Multiboard - Set the text for Multiboard[(Integer B)] item in column 1, row 10 to No Hero
              • Multiboard - Set the icon for Multiboard[(Integer B)] item in column 2, row 10 to ReplaceableTextures\WorldEditUI\Editor-MultipleUnits.blp
              • Multiboard - Set the display style for Multiboard[(Integer B)] item in column 2, row 10 to Hide text and Show icons
 
Status
Not open for further replies.
Top