HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Multiboard Woes

08-03-2006, 09:54 AM#1
Karawasa
I am trying to get a multiboard up and running. I got most of the things working except one big pain in the ass thing with icons and also one other minor detail.

First off, here are the relevant codes:

Create:

Trigger:
Create Multiboard
Collapse Events
Time - Elapsed game time is 1.00 seconds
Conditions
Collapse Actions
Set Player_Colors[0] = |c00ff0000
Set Player_Colors[1] = |c000000ff
Set Player_Colors[2] = |c0000ffff
Set Player_Colors[3] = |c00800080
Set Player_Colors[4] = |c00ffff00
Set Player_Colors[5] = |c00ff8000
Set Player_Colors[6] = |c0000ff00
Set Player_Colors[7] = |c00ff00ff
Multiboard - Create a multiboard with 3 columns and 12 rows, titled Element TD
Collapse For each (Integer A) from 1 to 12, do (Actions)
Collapse Loop - Actions
Collapse For each (Integer B) from 1 to 3, do (Actions)
Collapse Loop - Actions
Multiboard - Set the width for (Last created multiboard) item in column (Integer B), row (Integer A) to 0.00% of the total screen width
Multiboard - Set the display style for (Last created multiboard) item in column (Integer B), row (Integer A) to Show text and Hide icons
Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Current Level:
Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to Next Level:
Collapse For each (Integer A) from 1 to 2, do (Actions)
Collapse Loop - Actions
Collapse For each (Integer B) from 2 to 3, do (Actions)
Collapse Loop - Actions
Multiboard - Set the width for (Last created multiboard) item in column (Integer B), row (Integer A) to 1.25% of the total screen width
Multiboard - Set the display style for (Last created multiboard) item in column (Integer B), row (Integer A) to Show text and Show icons
Multiboard - Set the icon for (Last created multiboard) item in column 2, row 1 to ReplaceableTextures\CommandButtons\BTNHumanArmorUpOne.blp
Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to (String(Level))
Multiboard - Set the icon for (Last created multiboard) item in column 2, row 2 to ReplaceableTextures\CommandButtons\BTNDeathPact.blp
Multiboard - Set the text for (Last created multiboard) item in column 2, row 2 to (String((Level + 1)))
Multiboard - Set the text for (Last created multiboard) item in column 1, row 3 to Interest in:
Multiboard - Set the text for (Last created multiboard) item in column 2, row 3 to 0:15
Collapse For each (Integer A) from 1 to 12, do (Actions)
Collapse Loop - Actions
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 text for (Last created multiboard) item in column 1, row 4 to Player Name
Multiboard - Set the text for (Last created multiboard) item in column 2, row 4 to Lives
Multiboard - Set the text for (Last created multiboard) item in column 3, row 4 to Net Worth
Multiboard - Set the width for (Last created multiboard) item in column 3, row 4 to 10.00% of the total screen width
Collapse For each (Integer A) from 5 to 12, do (Actions)
Collapse Loop - Actions
Multiboard - Set the text for (Last created multiboard) item in column 1, row (Integer A) to ((Player_Colors[((Integer A) - 5)] + Player ) + ((String(((Integer A) - 4))) + |r))
Multiboard - Set the text for (Last created multiboard) item in column 2, row (Integer A) to (String(Player_Lives[((Integer A) - 5)]))
Multiboard - Set the text for (Last created multiboard) item in column 3, row (Integer A) to (String(Networth[((Integer A) - 4)]))
Multiboard - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 10.00% of the total screen width
Collapse For each (Integer A) from 1 to 3, do (Actions)
Collapse Loop - Actions
Multiboard - Set the color for (Last created multiboard) item in column 1, row (Integer A) to (100.00%, 80.00%, 0.00%) with 0.00% transparency
Multiboard - Set the color for (Last created multiboard) item in column 0, row 4 to (100.00%, 80.00%, 0.00%) with 0.00% transparency
Multiboard - Show (Last created multiboard)

Update:

Trigger:
Update Multiboard
Collapse Events
Time - Every 1.00 seconds of game time
Conditions
Collapse Actions
Set Player_Colors[0] = |c00ff0000
Set Player_Colors[1] = |c000000ff
Set Player_Colors[2] = |c0000ffff
Set Player_Colors[3] = |c00800080
Set Player_Colors[4] = |c00ffff00
Set Player_Colors[5] = |c00ff8000
Set Player_Colors[6] = |c0000ff00
Set Player_Colors[7] = |c00ff00ff
Collapse For each (Integer A) from 1 to 12, do (Actions)
Collapse Loop - Actions
Collapse For each (Integer B) from 1 to 3, do (Actions)
Collapse Loop - Actions
Multiboard - Set the width for (Last created multiboard) item in column (Integer B), row (Integer A) to 0.00% of the total screen width
Multiboard - Set the display style for (Last created multiboard) item in column (Integer B), row (Integer A) to Show text and Hide icons
Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Current Level:
Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to Next Level:
Collapse For each (Integer A) from 1 to 2, do (Actions)
Collapse Loop - Actions
Collapse For each (Integer B) from 2 to 3, do (Actions)
Collapse Loop - Actions
Multiboard - Set the width for (Last created multiboard) item in column (Integer B), row (Integer A) to 1.25% of the total screen width
Multiboard - Set the display style for (Last created multiboard) item in column (Integer B), row (Integer A) to Show text and Show icons
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Characteristic[(Level - 1)] Equal to 1
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 3, row 1 to ReplaceableTextures\CommandButtons\BTNEngineeringUpgrade.blp
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Characteristic[(Level - 1)] Equal to 2
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 3, row 1 to ReplaceableTextures\CommandButtons\BTNSkeletonWarrior.blp
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Characteristic[(Level - 1)] Equal to 3
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 3, row 1 to ReplaceableTextures\CommandButtons\BTNHeal.blp
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Characteristic[(Level - 1)] Equal to 4
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 3, row 1 to ReplaceableTextures\CommandButtons\BTNBootsOfSpeed.blp
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Element[(Level - 1)] Equal to 0
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 2, row 1 to ReplaceableTextures\CommandButtons\BTNHumanArmorUpOne.blp
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Element[(Level - 1)] Equal to 1
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 2, row 1 to war3mapImported\water_armor.TGA
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Element[(Level - 1)] Equal to 2
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 2, row 1 to war3mapImported\fire_armor.TGA
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Element[(Level - 1)] Equal to 3
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 2, row 1 to war3mapImported\nature_armor.TGA
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Element[(Level - 1)] Equal to 4
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 2, row 1 to war3mapImported\earth_armor.TGA
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Element[(Level - 1)] Equal to 5
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 2, row 1 to war3mapImported\light_armor.TGA
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Element[(Level - 1)] Equal to 6
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 2, row 1 to war3mapImported\darkness_armor.TGA
Else - Actions
Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to (String(Level))
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Characteristic[Level] Equal to 1
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 3, row 2 to ReplaceableTextures\CommandButtons\BTNEngineeringUpgrade.blp
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Characteristic[Level] Equal to 2
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 3, row 2 to ReplaceableTextures\CommandButtons\BTNSkeletonWarrior.blp
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Characteristic[Level] Equal to 3
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 3, row 2 to ReplaceableTextures\CommandButtons\BTNHeal.blp
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Characteristic[Level] Equal to 4
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 3, row 2 to ReplaceableTextures\CommandButtons\BTNBootsOfSpeed.blp
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Element[Level] Equal to 0
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 2, row 2 to ReplaceableTextures\CommandButtons\BTNHumanArmorUpOne.blp
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Element[Level] Equal to 1
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 2, row 2 to war3mapImported\water_armor.TGA
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Element[Level] Equal to 2
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 2, row 2 to war3mapImported\fire_armor.TGA
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Element[Level] Equal to 3
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 2, row 2 to war3mapImported\nature_armor.TGA
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Element[Level] Equal to 4
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 2, row 2 to war3mapImported\earth_armor.TGA
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Element[Level] Equal to 5
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 2, row 2 to war3mapImported\light_armor.TGA
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Multiboard_Element[Level] Equal to 6
Collapse Then - Actions
Multiboard - Set the icon for (Last created multiboard) item in column 2, row 2 to war3mapImported\darkness_armor.TGA
Else - Actions
Multiboard - Set the text for (Last created multiboard) item in column 2, row 2 to (String((Level + 1)))
Multiboard - Set the text for (Last created multiboard) item in column 1, row 3 to Interest in:
Multiboard - Set the text for (Last created multiboard) item in column 2, row 3 to (String(InterestInteger))
Collapse For each (Integer A) from 1 to 12, do (Actions)
Collapse Loop - Actions
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 text for (Last created multiboard) item in column 1, row 4 to Player Name
Multiboard - Set the text for (Last created multiboard) item in column 2, row 4 to Lives
Multiboard - Set the text for (Last created multiboard) item in column 3, row 4 to Net Worth
Multiboard - Set the width for (Last created multiboard) item in column 3, row 4 to 10.00% of the total screen width
Collapse For each (Integer A) from 5 to 12, do (Actions)
Collapse Loop - Actions
Multiboard - Set the text for (Last created multiboard) item in column 1, row (Integer A) to ((Player_Colors[((Integer A) - 5)] + Player ) + ((String(((Integer A) - 4))) + |r))
Multiboard - Set the text for (Last created multiboard) item in column 2, row (Integer A) to (String(Player_Lives[((Integer A) - 5)]))
Multiboard - Set the text for (Last created multiboard) item in column 3, row (Integer A) to (String(Networth[((Integer A) - 4)]))
Multiboard - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 10.00% of the total screen width
Collapse For each (Integer A) from 1 to 3, do (Actions)
Collapse Loop - Actions
Multiboard - Set the color for (Last created multiboard) item in column 1, row (Integer A) to (100.00%, 80.00%, 0.00%) with 0.00% transparency
Multiboard - Set the color for (Last created multiboard) item in column 0, row 4 to (100.00%, 80.00%, 0.00%) with 0.00% transparency

Determine Icons:

Trigger:
Determine Icons
Events
Conditions
Collapse Actions
Collapse For each (Integer B) from 0 to 59, do (Actions)
Collapse Loop - Actions
Set Temp_Point = (Player 12 (Brown) start location)
Unit - Create 1 Spawns[(Integer B)] for Player 12 (Brown) at Temp_Point facing 270.00 degrees
Unit - Remove (Last created unit) from the game
Custom script: call RemoveLocation(udg_Temp_Point)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Unit-type of (Last created unit)) is Mechanical) Equal to True
Collapse Then - Actions
Set Multiboard_Characteristic[(Integer B)] = 1
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Unit-type of (Last created unit)) is Undead) Equal to True
Collapse Then - Actions
Set Multiboard_Characteristic[(Integer B)] = 2
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Unit-type of (Last created unit)) is A peon-type unit) Equal to True
Collapse Then - Actions
Set Multiboard_Characteristic[(Integer B)] = 3
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Current movement speed of (Random unit from (Units of type (Unit-type of (Last created unit))))) Greater than 300.00
Collapse Then - Actions
Set Multiboard_Characteristic[(Integer B)] = 4
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Point-value of (Last created unit)) Equal to 0
Collapse Then - Actions
Set Multiboard_Element[(Integer B)] = 0
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Point-value of (Last created unit)) Equal to 1
Collapse Then - Actions
Set Multiboard_Element[(Integer B)] = 1
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Point-value of (Last created unit)) Equal to 2
Collapse Then - Actions
Set Multiboard_Element[(Integer B)] = 2
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Point-value of (Last created unit)) Equal to 3
Collapse Then - Actions
Set Multiboard_Element[(Integer B)] = 3
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Point-value of (Last created unit)) Equal to 4
Collapse Then - Actions
Set Multiboard_Element[(Integer B)] = 4
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Point-value of (Last created unit)) Equal to 5
Collapse Then - Actions
Set Multiboard_Element[(Integer B)] = 5
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Point-value of (Last created unit)) Equal to 6
Collapse Then - Actions
Set Multiboard_Element[(Integer B)] = 6
Else - Actions

Ok, now the problems:

First, none of the icons are being properly set at all. They do not correspond to the way I determined them in the trigger whatsoever.

Second, the last column of the multiboard (column 3) is really narrow. I need it to be longer.

All help will be appreciated.
08-03-2006, 11:12 AM#2
AtOmIc_PeAnUt
Well, only thing I can think of for icons not corresponding is that you put incorrect column and row values somewhere, it's what I did and it drove me crazy, as I always overlook the obvious.

As for thin column, do the multiboard action, "set item width" and if you want the whole column widened, when it asks for row and column numbers, put 0 for the column number.

Hope that helped :D
08-03-2006, 11:24 AM#3
The)TideHunter(
Also, the Integer A from 1 - 12 and B from 1 - 3 isent good.
Use this instead:

Trigger:
Actions
Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons

If you read underneath the parameters when you are on the multiboard section, it says:
"Use a column value of zero to affect all columns. Use a row value of zero to affect all rows."
08-03-2006, 11:36 AM#4
oNdizZ
im not really sure when warcraft uses the alpha values and not, but.. karawasa, do you know that you use 00 for the alpha value?
|cAARRGGBB |r

and why are you setting that color array once every second? i see no use of that since they should be static ^^

you also set the display value to 'hide icons', i think you need to set it to 'show icons' before setting the icon on the field. try that. :p

edit: umm, tidehunter, thats like.. what atomic peanut said :p (perhaps a bit blurry though)
08-03-2006, 11:48 AM#5
The)TideHunter(
Nah, alpha dosent matter, i think it used to play a role, but no matter what you put in their now, it dosent matter, the colour stays the same.
08-03-2006, 06:02 PM#6
Karawasa
The icons are being showed. The problem is they are the wrong ones (I.e. the eye icon) and they never update.
08-03-2006, 07:07 PM#7
oNdizZ
when do you run the Determine Icons trigger? cant see it in the other two.
08-04-2006, 03:29 AM#8
Karawasa
Resolved icons. Can't get the fucking width of the third colum to work. I tried setting the items width column 3 rows 1-12 and it failed :(./