• 🏆 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] MPI Multiboard - Help please!

Status
Not open for further replies.
Level 11
Joined
Jan 25, 2009
Messages
572
Hello everyone. I really need help because i want to know if there are any way to create a MPI multiboard, or atleast place a Leaderboard into the Multiboard. Or do i really have to use a Leaderboard to get 'thing' to work? In DotA there's a MPI multiboard. Like if i type the command "-ii" (Item Imformation) All the other teammates items shows up only for me. Icefrog must have some kind of a MPI multiboard or a small JASS script to get it to work... Well please give me a GUI solution please! Thanks :cute:
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
JASS:
local integer i=0
loop
    exitwhen(i==12)
    set boardArray[i]=CreateMultiboard()
    call MultiboardDisplay(boardArray[i], GetLocalPlayer()==Player(i))
    set i=i+1
endloop

You still need to create the multiboard non-locally, but the difference would be who you display the multiboard to. Each player would only be displayed their associated multiboard, in this case. You can manipulate the board however you want after this point. I actually just recently created a MPI multiboard for a friend that displays different values for each player, depending on what unit they have selected. It does work, and that is confirmation for you, Pharoah_.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Multiboard - Create a multiboard with 2 columns and 2 rows, titled Title
          • Set Board[(Integer A)] = (Last created multiboard)
          • Custom script: if GetLocalPlayer()==Player(bj_forLoopAIndex-1) then
          • Multiboard - Show Board[(Integer A)]
          • Custom script: endif
Okay, well this is a "GUI Equivalent". The custom script is completely necessary, since there is no equivalent for GetLocalPlayer() in GUI. Basically what it does it checks to see whether or not Player "X" is the local player. Here's a little plot board to explain whats happening:

Code:
3 Boards -- this is for a situation where there are 3 players.

Loop through players 1 - 12 (the 9 players that are not currently playing will not matter)

Player 1 - Display Board "1" (true)
Player 1 - Display Board "2" (false)
Player 1 - Display Board "3" (false)

Player 2 - Display Board "1" (false)
Player 2 - Display Board "2" (true)
Player 2 - Display Board "3" (false)

Player 3 - Display Board "1" (false)
Player 3 - Display Board "2" (false)
Player 3 - Display Board "3" (true)

This results in each player only having a single player-specific multiboard available to them.
 
Level 11
Joined
Jan 25, 2009
Messages
572
So, Pharaoh_, should i do like this or should i use a Player Group?
  • Multiboard ShowResources
    • Events
      • Player - Player 1 (Red) types a chat message containing -showresources as An exact match
      • Player - Player 2 (Blue) types a chat message containing -showresources as An exact match
      • Player - Player 3 (Teal) types a chat message containing -showresources as An exact match
      • Player - Player 4 (Purple) types a chat message containing -showresources as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -showresources as An exact match
      • Player - Player 6 (Orange) types a chat message containing -showresources as An exact match
      • Player - Player 7 (Green) types a chat message containing -showresources as An exact match
      • Player - Player 8 (Pink) types a chat message containing -showresources as An exact match
      • Player - Player 9 (Gray) types a chat message containing -showresources as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -showresources as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -showresources as An exact match
      • Player - Player 12 (Brown) types a chat message containing -showresources as An exact match
      • Player - Player 1 (Red) types a chat message containing -sr as An exact match
      • Player - Player 2 (Blue) types a chat message containing -sr as An exact match
      • Player - Player 3 (Teal) types a chat message containing -sr as An exact match
      • Player - Player 4 (Purple) types a chat message containing -sr as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -sr as An exact match
      • Player - Player 6 (Orange) types a chat message containing -sr as An exact match
      • Player - Player 7 (Green) types a chat message containing -sr as An exact match
      • Player - Player 8 (Pink) types a chat message containing -sr as An exact match
      • Player - Player 9 (Gray) types a chat message containing -sr as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -sr as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -sr as An exact match
      • Player - Player 12 (Brown) types a chat message containing -sr as An exact match
    • Conditions
    • Actions
      • Multiboard - Show (Load 2 of (Key (Triggering player)) in Temp_Hashtable)
 
First of all, for less pain in GUI triggering:
  • Trigger
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • For each (Integer A) from 1 to 12, do (Actions)
      • Loop - Actions
        • Trigger - Add to (Trigger 1 <gen>) the event (Player - Player(IntegerA) types a chat message containing -showresources as An exact match
        • Trigger - Add to (Trigger 1 <gen>) the event (Player - Player(IntegerA) types a chat message containing -sr as An exact match
  • Trigger1
  • Events
  • Conditions
  • Actions
    • Multiboard - Show (Load 2 of (Key (Triggering player)) in Temp_Hashtable)
Now, it depends on what you are going to do with the player. If you need enhanced features for that command, you are likely encouraged to add the player to a Player Group, else, don't bother. If you for example make a check in another trigger that checks if the Player's multiboard is shown, then yes, either add the player to a player group or attach a "True" value to them, e.g.
  • Hashtable - Save True as (key(multishow)) of (Key(Triggering Player)) in Temp_Hashtable
P.S. Hashtables are never "temp" :)
 
Status
Not open for further replies.
Top