HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Multiboard Problems

11-29-2007, 01:30 AM#1
Monky-Master
Trigger:
Initialization
Collapse Events
Time - Elapsed game time is 1.00 seconds
Conditions
Collapse Actions
Set Levels = 1
Set Lives = 40
Countdown Timer - Start Timer as a One-shot timer that will expire in 60.00 seconds
Set Timer = (Last started timer)
Set RealCheck = (Remaining time for Timer)
Game - Display to (All players) for 15.00 seconds the text: Welcome to Splash T...
Collapse Player Group - Pick every player in (All players) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Collapse Then - Actions
Set Number_Of_Players = (Player number of (Picked player))
Player Group - Add (Picked player) to Player_Is_Here
Player - Turn Gives bounty On for (Picked player)
Multiboard - Create a multiboard with 2 columns and ((Player number of (Picked player)) + 5) rows, titled Board of Status
Set MultiBoard = (Last created multiboard)
Multiboard - Set the width for MultiBoard item in column 1, row 0 to 15.00% of the total screen width
Multiboard - Set the width for MultiBoard item in column 2, row 0 to 10.00% of the total screen width
Multiboard - Set the text for MultiBoard item in column 1, row 1 to Player Names
Multiboard - Set the text for MultiBoard item in column 2, row 1 to Kills
Multiboard - Set the text for MultiBoard item in column 1, row ((Player number of (Picked player)) + 1) to (Name of (Picked player))
Multiboard - Set the text for MultiBoard item in column 1, row ((Player number of (Picked player)) + 2) to Other Stuff
Multiboard - Set the text for MultiBoard item in column 1, row ((Player number of (Picked player)) + 3) to Lives
Multiboard - Set the text for MultiBoard item in column 1, row ((Player number of (Picked player)) + 4) to Timer
Multiboard - Set the text for MultiBoard item in column 1, row ((Player number of (Picked player)) + 5) to Level
Multiboard - Set the color for MultiBoard item in column 1, row 1 to (50.00%, 80.00%, 35.00%) with 0.00% transparency
Multiboard - Set the color for MultiBoard item in column 1, row ((Player number of (Picked player)) + 2) to (50.00%, 80.00%, 35.00%) with 0.00% transparency
Multiboard - Set the color for MultiBoard item in column 1, row ((Player number of (Picked player)) + 3) to (50.00%, 35.00%, 80.00%) with 0.00% transparency
Multiboard - Set the color for MultiBoard item in column 1, row ((Player number of (Picked player)) + 4) to (70.00%, 35.00%, 40.00%) with 0.00% transparency
Multiboard - Set the color for MultiBoard item in column 1, row ((Player number of (Picked player)) + 5) to (35.00%, 40.00%, 80.00%) with 0.00% transparency
Multiboard - Set the color for MultiBoard item in column 2, row 1 to (100.00%, 25.00%, 50.00%) with 0.00% transparency
Multiboard - Set the text for MultiBoard item in column 2, row ((Player number of (Picked player)) + 1) to 0
Multiboard - Set the text for MultiBoard item in column 2, row ((Player number of (Picked player)) + 3) to (String(Lives))
Multiboard - Set the text for MultiBoard item in column 2, row ((Player number of (Picked player)) + 5) to (String(Levels))
Multiboard - Set the display style for MultiBoard item in column 0, row 0 to Show text and Hide icons
Multiboard - Show MultiBoard
Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across (Playable map area)
Player - Set (Picked player) Current gold to 15
Collapse Else - Actions
Player - Turn Gives bounty On for (Picked player)

There's my script...
The problem is when the script fires with multiple players in game, the board gets all messed up. I checked everything, and I can't seem to find what's wrong. Will anyone help?

EDIT : The player names don't show up. That's the main problem.

There are no conditions, because I was testing it.
11-29-2007, 02:18 AM#2
Jazradel
That code really confuses me. The problem is that your creating a new multiboard for every player.

Basically move everything that doesn't refer to the (Picked Player) out of that loop.
11-29-2007, 02:34 AM#3
Monky-Master
I'm pretty sure it's only one Multi Board right? If pick every player and create a multi board and put them in it, it should only be one.
11-29-2007, 02:48 AM#4
Malf
Different players can have different multiboards. You can create 9 multiboards for 9 players, but only one will be shown to them.

In your case, you should show the multiboard you want for the player and not to everyone else.

You would have to use JASS for this, GUI(The poor man's JASS) is just far too lame.
11-29-2007, 02:58 AM#5
Monky-Master
To me, JASS is like Japanese. I barely understand it, and I barely can write it. This is what happens when you work with GUI for 3 years sadly.

Well, I guess I gotta find a new way to do this then I suppose.
11-29-2007, 07:04 AM#6
Pyrogasm
Just a few custom scripts is all you need. Depends what you want to do differently for each player. This might be exactly what you want:
Trigger:
Initialization
Collapse Events
Time - Elapsed game time is 1.00 seconds
Conditions
Collapse Actions
Set Levels = 1
Set Lives = 40
Countdown Timer - Start Timer as a One-shot timer that will expire in 60.00 seconds
Set Timer = (Last started timer)
Set RealCheck = (Remaining time for Timer)
Game - Display to (All players) for 15.00 seconds the text: Welcome to Splash T...
Collapse Player Group - Pick every player in (All players) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Collapse Then - Actions
Set Number_Of_Players = (Player number of (Picked player))
Player Group - Add (Picked player) to Player_Is_Here
Player - Turn Gives bounty On for (Picked player)
Multiboard - Create a multiboard with 2 columns and ((Player number of (Picked player)) + 5) rows, titled Board of Status
Set MultiBoard = (Last created multiboard)
Custom script: if GetLocalPlayer() == GetEnumPlayer() then
Multiboard - Set the width for MultiBoard item in column 1, row 0 to 15.00% of the total screen width
Multiboard - Set the width for MultiBoard item in column 2, row 0 to 10.00% of the total screen width
Multiboard - Set the text for MultiBoard item in column 1, row 1 to Player Names
Multiboard - Set the text for MultiBoard item in column 2, row 1 to Kills
Multiboard - Set the text for MultiBoard item in column 1, row ((Player number of (Picked player)) + 1) to (Name of (Picked player))
Multiboard - Set the text for MultiBoard item in column 1, row ((Player number of (Picked player)) + 2) to Other Stuff
Multiboard - Set the text for MultiBoard item in column 1, row ((Player number of (Picked player)) + 3) to Lives
Multiboard - Set the text for MultiBoard item in column 1, row ((Player number of (Picked player)) + 4) to Timer
Multiboard - Set the text for MultiBoard item in column 1, row ((Player number of (Picked player)) + 5) to Level
Multiboard - Set the color for MultiBoard item in column 1, row 1 to (50.00%, 80.00%, 35.00%) with 0.00% transparency
Multiboard - Set the color for MultiBoard item in column 1, row ((Player number of (Picked player)) + 2) to (50.00%, 80.00%, 35.00%) with 0.00% transparency
Multiboard - Set the color for MultiBoard item in column 1, row ((Player number of (Picked player)) + 3) to (50.00%, 35.00%, 80.00%) with 0.00% transparency
Multiboard - Set the color for MultiBoard item in column 1, row ((Player number of (Picked player)) + 4) to (70.00%, 35.00%, 40.00%) with 0.00% transparency
Multiboard - Set the color for MultiBoard item in column 1, row ((Player number of (Picked player)) + 5) to (35.00%, 40.00%, 80.00%) with 0.00% transparency
Multiboard - Set the color for MultiBoard item in column 2, row 1 to (100.00%, 25.00%, 50.00%) with 0.00% transparency
Multiboard - Set the text for MultiBoard item in column 2, row ((Player number of (Picked player)) + 1) to 0
Multiboard - Set the text for MultiBoard item in column 2, row ((Player number of (Picked player)) + 3) to (String(Lives))
Multiboard - Set the text for MultiBoard item in column 2, row ((Player number of (Picked player)) + 5) to (String(Levels))
Multiboard - Set the display style for MultiBoard item in column 0, row 0 to Show text and Hide icons
Multiboard - Show MultiBoard
Custom script: endif
Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across (Playable map area)
Player - Set (Picked player) Current gold to 15
Collapse Else - Actions
Player - Turn Gives bounty On for (Picked player)