HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Resizable Multiboard

05-21-2006, 04:13 PM#1
Siphonized
Been trying alot but getting troublesome... I want a multiboard that changes size depending on how many players are in the game, 1 row per player...

I've done that... Now the problem is... I got a trigger that is supposed to add a value to a specific row depending on who killed a unit...

If player 1 kills a unit... it ofcourse adds the value to row 1... but... if the 2nd player joined the game as player 4... and there's only 2 players... How do I get Player 4's value into Row 2? Player Number doesnt work since it writes it in Row 4 (duh...), and Row 4 is not supposed to exist...
05-21-2006, 04:27 PM#2
The)TideHunter(
This is very complicated, it all depends on how you have made your mutliboard, please can you post the code of your multiboard so we know how to adjust to it.

In reality though, you need to save a integer variable showing which player is which.
this can get messy
05-21-2006, 04:35 PM#3
harshateja
its actually quite simple. In your init event (or every x seconds if you want to account for leaves), create a player array and loop through all players from 1 - 12. Check if player is on and then set player[playernumber - 1] to that. In your multiboard, use this playerarray variable to decide the size and position required.
05-21-2006, 04:38 PM#4
The)TideHunter(
That really wont work, player 12 can be in players 2s place on the multiboard, you have to assign and edit.
It especially gets complicated when you have computers as a middish player like player 3 - 10
05-21-2006, 04:52 PM#5
Siphonized
Trigger:
Multiboard
Collapse Events
Time - Elapsed game time is 0.25 seconds
Conditions
Collapse Actions
Multiboard - Create a multiboard with 4 columns and (AmountOfPlayers + 2) rows, titled Game Statistics
Set board = (Last created multiboard)
-------- --------
Multiboard - Minimize (Last created multiboard)
Multiboard - Set the color for (Last created multiboard) item in column 1, row 1 to (80.00%, 10.00%, 10.00%) with 0.00% transparency
Multiboard - Set the color for (Last created multiboard) item in column 2, row 1 to (80.00%, 10.00%, 10.00%) with 0.00% transparency
Multiboard - Set the color for (Last created multiboard) item in column 3, row 1 to (80.00%, 10.00%, 10.00%) with 0.00% transparency
Multiboard - Set the color for (Last created multiboard) item in column 4, row 1 to (80.00%, 10.00%, 10.00%) with 0.00% transparency
Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Player
Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Lives
Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to Rep
Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to PvP
-------- --------
Collapse For each (Integer A) from 1 to (AmountOfPlayers + 2), do (Actions)
Collapse Loop - Actions
Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 9.00% of the total screen width
Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 4.00% of the total screen width
Multiboard - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 4.00% of the total screen width
Multiboard - Set the width for (Last created multiboard) item in column 4, row (Integer A) to 3.00% of the total screen width
Multiboard - Set the display style for (Last created multiboard) item in column 1, row (Integer A) to Show text and Hide icons
Multiboard - Set the display style for (Last created multiboard) item in column 2, row (Integer A) to Show text and Hide icons
Multiboard - Set the display style for (Last created multiboard) item in column 3, row (Integer A) to Show text and Hide icons
Multiboard - Set the display style for (Last created multiboard) item in column 4, row (Integer A) to Show text and Hide icons
Collapse For each (Integer B) from 1 to AmountOfPlayers, do (Actions)
Collapse Loop - Actions
Multiboard - Set the text for (Last created multiboard) item in column 1, row ((Integer B) + 1) to (Name of Players[(Integer B)])
Multiboard - Set the text for (Last created multiboard) item in column 2, row ((Integer B) + 1) to (String((Integer((Life of Shrines[(Integer B)])))))
Multiboard - Set the text for (Last created multiboard) item in column 3, row ((Integer B) + 1) to (String(Reputation[(Integer B)]))
Multiboard - Set the text for (Last created multiboard) item in column 4, row ((Integer B) + 1) to (|cffffff33 + ((+ + 0) + |r))
Multiboard - Set the text for board item in column 1, row (AmountOfPlayers + 2) to Time:
Multiboard - Show (Last created multiboard)
05-21-2006, 04:53 PM#6
Siphonized
Might not be 100% correct atm... but it's (AmountOfPlayers + 2) rows because the top row is Titles, and the bottom is Time.

Supposed to look like this:
----------------------------------
Name_____Lives____Rep_____PvP
Siphon_____50 ______0 _____+0
Random____50 ______0______+0
Time:____________00:00:01____
-----------------------------------

That's how it should look if it's only two people playing, and it does look like this, the trouble is.. if Random joined as Player 6... I can't assign new values to Lives/Rep/PvP since I havent found any good triggers for that. You see, Random is Player 2 now... But was 6 when he joined... So he would still count as Player #6.

Example:

Player 6 (Random) kills a unit. Now he's supposed to get Rep for that, and it's supposed to show in Column 3, Row 3... (hard, this is what I dont know how to fix)
Player 1 (Siphon) kills a unit. Now he's supposed to get Rep for that, and it's supposed to show in Column 3, Row 2... (easy.. Player Number + 1)
05-21-2006, 05:08 PM#7
MysticGeneral
Where you loop Integeber B, don't you mean (Integer B + 2) and not +1?... Also, show us how you got the variable "AmountOfPlayers" stored.

EDIT: I found out your problem. Here, do this:

Create an integer array. Name it like PlayerRow[]

Now, when you do the playerslot comparison crap to check the amount of players, add the actions

Trigger:
Set PlayerRow[0] = PlayerRow[0] + 1
Set PlayerRow[Player's Number] = PlayerRow[0] (which is 1)

Now, when yer adding the kills to the row, instead of using GetPlayerNumber, use the integer PlayerRow[GetPlayerNumber]. I dunno if that made any sense to you, but it should work - hehe.
05-21-2006, 05:29 PM#8
Siphonized
Don't quite understand... I'll add the trigger so u can implement it yourself.

EDIT: Nvm, I understand it now

Trigger:
Names
Collapse Events
Map initialization
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player 1 (Red) slot status) Equal to Is playing
Collapse Then - Actions
Set Players[(AmountOfPlayers + 1)] = (Player(1))
Set AmountOfPlayers = (AmountOfPlayers + 1)
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player 2 (Blue) slot status) Equal to Is playing
Collapse Then - Actions
Set Players[(AmountOfPlayers + 1)] = (Player(2))
Set AmountOfPlayers = (AmountOfPlayers + 1)
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player 3 (Teal) slot status) Equal to Is playing
Collapse Then - Actions
Set Players[(AmountOfPlayers + 1)] = (Player(3))
Set AmountOfPlayers = (AmountOfPlayers + 1)
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player 4 (Purple) slot status) Equal to Is playing
Collapse Then - Actions
Set Players[(AmountOfPlayers + 1)] = (Player(4))
Set AmountOfPlayers = (AmountOfPlayers + 1)
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player 5 (Yellow) slot status) Equal to Is playing
Collapse Then - Actions
Set Players[(AmountOfPlayers + 1)] = (Player(5))
Set AmountOfPlayers = (AmountOfPlayers + 1)
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player 6 (Orange) slot status) Equal to Is playing
Collapse Then - Actions
Set Players[(AmountOfPlayers + 1)] = (Player(6))
Set AmountOfPlayers = (AmountOfPlayers + 1)
Collapse Else - Actions
Do nothing