• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Solved] Multiboards

Status
Not open for further replies.
Level 14
Joined
Aug 8, 2010
Messages
1,022
Hello, guys! I am a complete NOOB for multiboards. To be honest, this is the first time i use them. Everything is going well for now, but i have two problems :
1. If i have two multiboards, the second one is placed over the first one, thus the first one is invisible.
2. I can't hide a multiboard for one exact player (or player group).

So, the second problem comes from the first one... i want to create two multiboards, the first one displays the stats for the first team, the second one displays the stats for the second team. I wanted both multiboards to be visible but i saw that the second one overlaps the first one, so i tried to hide the enemy multiboard aaaand i failed... :D

  • Multiboards
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 3 columns and 1 rows, titled (Southwest team score + ( -- + (String(OverallScore[1]))))
      • Set Multiboards[1] = (Last created multiboard)
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set PlayersInTeam = 0
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) slot status) Equal to Is playing
              • (Player number of (Picked player)) Less than or equal to 6
            • Then - Actions
              • Set PlayersInTeam = (PlayersInTeam + 1)
              • Player Group - Add (Picked player) to Teams[1]
              • Multiboard - Change the number of rows for Multiboards[1] to PlayersInTeam
              • Multiboard - Set the width for Multiboards[1] item in column 1, row (Player number of (Picked player)) to 1.00% of the total screen width
              • Multiboard - Set the width for Multiboards[1] item in column 2, row (Player number of (Picked player)) to 15.00% of the total screen width
              • Multiboard - Set the width for Multiboards[1] item in column 3, row (Player number of (Picked player)) to 4.00% of the total screen width
              • Multiboard - Set the text for Multiboards[1] item in column 1, row (Player number of (Picked player)) to ((String((Player number of (Picked player)))) + .)
              • Multiboard - Set the text for Multiboards[1] item in column 2, row (Player number of (Picked player)) to (Name of (Picked player))
              • Multiboard - Set the text for Multiboards[1] item in column 3, row (Player number of (Picked player)) to (String(PlayerScore[(Player number of (Picked player))]))
              • Multiboard - Set the display style for Multiboards[1] item in column 1, row (Player number of (Picked player)) to Show text and Hide icons
              • Multiboard - Set the icon for Multiboards[1] item in column 2, row (Player number of (Picked player)) to ReplaceableTextures\WorldEditUI\Editor-Random-Unit.blp
              • Multiboard - Set the icon for Multiboards[1] item in column 3, row (Player number of (Picked player)) to ReplaceableTextures\CommandButtons\BTNSteelMelee.blp
            • Else - Actions
      • Multiboard - Create a multiboard with 3 columns and 1 rows, titled (Northeast team score + ( -- + (String(OverallScore[2]))))
      • Set Multiboards[2] = (Last created multiboard)
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set PlayersInTeam = 0
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) slot status) Equal to Is playing
              • (Player number of (Picked player)) Greater than 6
            • Then - Actions
              • Set PlayersInTeam = (PlayersInTeam + 1)
              • Player Group - Add (Picked player) to Teams[2]
              • Multiboard - Change the number of rows for Multiboards[2] to PlayersInTeam
              • Multiboard - Set the width for Multiboards[2] item in column 1, row (Player number of (Picked player)) to 1.00% of the total screen width
              • Multiboard - Set the width for Multiboards[2] item in column 2, row (Player number of (Picked player)) to 15.00% of the total screen width
              • Multiboard - Set the width for Multiboards[2] item in column 3, row (Player number of (Picked player)) to 4.00% of the total screen width
              • Multiboard - Set the text for Multiboards[2] item in column 1, row (Player number of (Picked player)) to ((String((Player number of (Picked player)))) + .)
              • Multiboard - Set the text for Multiboards[2] item in column 2, row (Player number of (Picked player)) to (Name of (Picked player))
              • Multiboard - Set the text for Multiboards[2] item in column 3, row (Player number of (Picked player)) to (String(PlayerScore[(Player number of (Picked player))]))
              • Multiboard - Set the display style for Multiboards[2] item in column 1, row (Player number of (Picked player)) to Show text and Hide icons
              • Multiboard - Set the icon for Multiboards[2] item in column 2, row (Player number of (Picked player)) to ReplaceableTextures\WorldEditUI\Editor-Random-Unit.blp
              • Multiboard - Set the icon for Multiboards[2] item in column 3, row (Player number of (Picked player)) to ReplaceableTextures\CommandButtons\BTNSteelMelee.blp
            • Else - Actions
      • Player Group - Pick every player in Teams[1] and do (Multiboard - Hide Multiboards[2])
      • Player Group - Pick every player in Teams[2] and do (Multiboard - Hide Multiboards[1])
Help me, please! I appreciate help with a +rep!
Thanks in advance, mates!
 
Level 16
Joined
Aug 7, 2009
Messages
1,403
You can show/hide multiboards for a player or a group of players by using GetLocalPlayer. Examples:

JASS:
//Hide the multiboard using the proper GUI function for everyone
if GetLocalPlayer()==Player(0) /*Player 1*/ then  //custom script
    //Put the GUI function call here that shows it
endif //custom script

JASS:
//Hide the multiboard using the proper GUI function for everyone
if IsPlayerInForce(GetLocalPlayer(),udg_MyForce) /* "udg_MyForce" is a global player group variable called "MyForce" */ then  //custom script
    //Put the GUI function call here that shows it
endif //custom script

It only takes two custom scripts and a GUI function call inbetween them.
 
Status
Not open for further replies.
Top