• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Need help with Multiboard

Status
Not open for further replies.
Level 13
Joined
Nov 13, 2010
Messages
286
i have try to made a Multiboard but it only wroks for 1 player
  • Player Colors
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Player_Colors[1] = |c00ff0303
      • Set Player_Colors[2] = |c000042ff
      • Set Player_Colors[3] = |c001ce6b9
      • Set Player_Colors[4] = |c00540081
      • Set Player_Colors[5] = |c00fffc01
      • Set Player_Colors[6] = |c00ff8000
      • Set Player_Colors[7] = |c0020c000
      • Set Player_Colors[8] = |c00e55bb0
      • Set Player_Colors[9] = |c00959697
      • Set Player_Colors[10] = |c007ebff1
      • Set Player_Colors[11] = |c00106246
      • Set Player_Colors[12] = |c004e2a04
  • Create Multiboard
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set Row_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 + Row_Count) rows, titled Unit TD War
      • Set Multiboard = (Last created multiboard)
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to |cff0000ffPlayer Na...
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to |cffc5bd08Gold|r
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to |cff087331Lumber|r
      • Set List = 1
        • Do Multiple ActionsFor each (Integer A) from 1 to (Row_Count + 1), do (Actions)
          • Loop - Actions
            • 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 2, row List to Show text and Hide icons
            • Multiboard - Set the display style for (Last created multiboard) item in column 3, row List to Show text and Hide icons
            • Multiboard - Set the display style for (Last created multiboard) item in column 4, row List to Show text and Hide icons
            • Multiboard - Set the width for (Last created multiboard) item in column 1, row List to 8.00% of the total screen width
            • Multiboard - Set the width for (Last created multiboard) item in column 2, row List to 10.00% of the total screen width
            • Multiboard - Set the width for (Last created multiboard) item in column 3, row List to 6.00% of the total screen width
            • Multiboard - Set the width for (Last created multiboard) item in column 4, row List to 6.00% of the total screen width
            • Set List = (List + 1)
      • Set List = 2
      • Player Group - Pick every player in (All players matching ((((Matching player) controller) Equal to (==) User) and (((Matching player) slot status) Equal to (==) Is playing))) and do (Actions)
        • Loop - Actions
          • Set Multiboard_Spots[(Player number of (Picked player))] = List
          • Multiboard - Set the icon for (Last created multiboard) item in column 1, row List to ReplaceableTextures\CommandButtons\BTNVillagerMan.blp
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row List to (Player_Colors[(Player number of (Picked player))] + ((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
          • Set List = (List + 1)
      • Multiboard - Show (Last created multiboard)
  • Resource Display
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Lumber[1] = (Player 1 (Red) Current lumber)
      • Set Lumber[2] = (Player 2 (Blue) Current lumber)
      • Set Lumber[3] = (Player 3 (Teal) Current lumber)
      • Set Lumber[4] = (Player 4 (Purple) Current lumber)
      • Set Lumber[5] = (Player 5 (Yellow) Current lumber)
      • Set Lumber[6] = (Player 6 (Orange) Current lumber)
      • Set Lumber[7] = (Player 7 (Green) Current lumber)
      • Set Lumber[8] = (Player 8 (Pink) Current lumber)
      • Set Gold[1] = (Player 1 (Red) Current gold)
      • Set Gold[2] = (Player 2 (Blue) Current gold)
      • Set Gold[3] = (Player 3 (Teal) Current gold)
      • Set Gold[4] = (Player 4 (Purple) Current gold)
      • Set Gold[5] = (Player 5 (Yellow) Current gold)
      • Set Gold[6] = (Player 6 (Orange) Current gold)
      • Set Gold[7] = (Player 7 (Green) Current gold)
      • Set Gold[8] = (Player 8 (Pink) Current gold)
      • Player Group - Pick every player in (All players matching ((((Matching player) controller) Equal to (==) User) and (((Matching player) slot status) Equal to (==) Is playing))) and do (Actions)
        • Loop - Actions
          • Multiboard - Set the text for Multiboard item in column 4, row Multiboard_Spots[(Player number of (Picked player))] to (String(Lumber[(Player number of (Picked player))]))
          • Multiboard - Set the text for Multiboard item in column 3, row Multiboard_Spots[(Player number of (Picked player))] to (String(Gold[(Player number of (Picked player))]))
  • Player leaves
    • Events
      • Player - Player 1 (Red) leaves the game
      • Player - Player 2 (Blue) leaves the game
      • Player - Player 3 (Teal) leaves the game
      • Player - Player 4 (Purple) leaves the game
      • Player - Player 5 (Yellow) leaves the game
      • Player - Player 6 (Orange) leaves the game
      • Player - Player 7 (Green) leaves the game
      • Player - Player 8 (Pink) leaves the game
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: (|cffFFFF00 + ((Name of (Triggering player)) + |r has left the game.))
          • Unit - Remove (Picked unit) from the game
          • Multiboard - Set the text for (Last created multiboard) item in column 0, row Multiboard_Spots[(Player number of (Triggering player))] to Gone
How do i fix this
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Why do you display a message inside a Pick Every Unit Loop?

There are Unit Groups leaks, and pLayer group leaks.
 
  • Resource Display
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players matching ((((Matching player) controller) Equal to (==) User) and (((Matching player) slot status) Equal to (==) Is playing))) and do (Actions)
        • Loop - Actions
          • Multiboard - Set the text for Multiboard item in column 4, row Multiboard_Spots[(Player number of (Picked player))] to (String(Lumber[(Player number of (Picked player))]))
          • Multiboard - Set the text for Multiboard item in column 3, row Multiboard_Spots[(Player number of (Picked player))] to (String(Gold[(Player number of (Picked player))]))

Off-topic:
Make this to prevent function spamming:
  • Resource Display
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players matching ((((Matching player) controller) Equal to (==) User) and (((Matching player) slot status) Equal to (==) Is playing))) and do (Actions)
        • Loop - Actions
          • Set temp_index = (Player number of (Picked player))
          • Multiboard - Set the text for Multiboard item in column 4, row Multiboard_Spots[temp_index] to (String(Lumber[temp_index]))
          • Multiboard - Set the text for Multiboard item in column 3, row Multiboard_Spots[temp_index] to (String(Gold[temp_index]))
On topic:

Have you set the values of the variable Multiboard_Spots[ ... ] to its proper values ?

<<< EDIT >>>

After looking in the triggers I found this:

You are setting Multiboard_Spots[(Player number of (Picked player))] to List which is equal to a constant '2'

<<< EDIT 2 >>>

Nothing wrong with the trigger I found you are making at the end of the loop List = List + 1. Try increasing the size of your array variables.
 
Level 13
Joined
Nov 13, 2010
Messages
286
Off-topic:
Make this to prevent function spamming:
  • Resource Display
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players matching ((((Matching player) controller) Equal to (==) User) and (((Matching player) slot status) Equal to (==) Is playing))) and do (Actions)
        • Loop - Actions
          • Set temp_index = (Player number of (Picked player))
          • Multiboard - Set the text for Multiboard item in column 4, row Multiboard_Spots[temp_index] to (String(Lumber[temp_index]))
          • Multiboard - Set the text for Multiboard item in column 3, row Multiboard_Spots[temp_index] to (String(Gold[temp_index]))
On topic:

Have you set the values of the variable Multiboard_Spots[ ... ] to its proper values ?

<<< EDIT >>>

After looking in the triggers I found this:

You are setting Multiboard_Spots[(Player number of (Picked player))] to List which is equal to a constant '2'

<<< EDIT 2 >>>

Nothing wrong with the trigger I found you are making at the end of the loop List = List + 1. Try increasing the size of your array variables.

Thx for the help it help me a lot
 
Level 6
Joined
Jun 19, 2010
Messages
143
try this
  • Create Multiboard
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) for 18.00 seconds the text: (In Game |c00ffff00Match's score:|r |c0000ff00Jerry - Tom: |r + (|c0000ffff + ((String(gamescore[1])) + (|r + ( - + ((|c0000ffff + (String(gamescore[2]))) + |r))))))
      • Multiboard - Create a multiboard with 6 columns and 1 rows, titled (Scoreboard for + ((String((gamescore[1] + gamescore[2]))) + games))
      • -------- Width --------
      • Multiboard - Set the width for (Last created multiboard) item in column 1, row 1 to 1.60% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 2, row 1 to 7.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 3, row 1 to 1.50% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 4, row 1 to 1.50% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 5, row 1 to 1.60% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 6, row 1 to 6.50% of the total screen width
      • -------- Text --------
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to |c00ffff00Jerry Tea...
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to (String(gamescore[1]))
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to (String(gamescore[2]))
      • Multiboard - Set the text for (Last created multiboard) item in column 6, row 1 to |c00ff0000Tom Team|r
      • -------- Now set the fields for the first row, AND our player rows. --------
      • Multiboard - Set the display style for (Last created multiboard) item in column 1, row 1 to Show text and Show icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 2, row 1 to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 3, row 1 to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 4, row 1 to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 5, row 1 to Show text and Show icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 6, row 1 to Show text and Hide icons
      • -------- Icon & Numbers --------
      • Multiboard - Set the icon for (Last created multiboard) item in column 1, row 1 to ReplaceableTextures\CommandButtons\BTNYouDirtyRat!.blp
      • Multiboard - Set the icon for (Last created multiboard) item in column 5, row 1 to ReplaceableTextures\CommandButtons\BTNPuss-in-boots.blp
      • Multiboard - Show (Last created multiboard)
This works perfectly in the attached map.
 

Attachments

  • Tom and Jerry 2012 Official Edition.w3x
    1 MB · Views: 61
Last edited:
Status
Not open for further replies.
Top