| 06-20-2005, 03:53 PM | #1 |
I attempted to create a Local Multiboard using the "if GetLocalPlayer() == Player(0) then" script. It causes all players to disconnect at Map initialization. Whats the best way to make a local multiboard such as this one work without the desync? Code:
CreateLocalMultiboards
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
-------- Player1 --------
Custom script: if GetLocalPlayer() == Player(0) then
Multiboard - Create a multiboard with 11 columns and 3 rows, titled Statistics
Set Multiboard[1] = (Last created multiboard)
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Multiboard - Set the width for (Last created multiboard) item in column (Integer A), row 1 to 1.00% of the total screen width
Multiboard - Set the icon for (Last created multiboard) item in column (Integer A), row 1 to ReplaceableTextures\TeamColor\TeamColor01.blp
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Multiboard - Set the width for (Last created multiboard) item in column (Integer A), row 2 to 1.00% of the total screen width
Multiboard - Set the icon for (Last created multiboard) item in column (Integer A), row 2 to ReplaceableTextures\TeamColor\TeamColor00.blp
For each (Integer A) from 1 to 11, do (Actions)
Loop - Actions
Multiboard - Set the display style for (Last created multiboard) item in column (Integer A), row 3 to Show text and Hide icons
Multiboard - Set the display style for (Last created multiboard) item in column 11, row 1 to Show text and Hide icons
Multiboard - Set the display style for (Last created multiboard) item in column 11, row 2 to Show text and Hide icons
Multiboard - Set the text for (Last created multiboard) item in column 11, row 1 to Shield
Multiboard - Set the text for (Last created multiboard) item in column 11, row 2 to Health
Multiboard - Minimize (Last created multiboard)
Multiboard - Maximize (Last created multiboard)
Custom script: endif
Else - Actions
Do nothing |
| 06-20-2005, 04:29 PM | #2 |
Don't create a multiboard for a local player, of coure creating objects causes desync. Create the board for all players and then just show it to a single player. |
| 06-20-2005, 04:30 PM | #3 |
The GetLocalPlayer() block shold only be used for the Show action and the things that change values and icons of items. When you create a multiboard you are creating an object, using memory and desyncing. for this case you can save up all the work and do this: Code:
Custom Script : call MultiboardDisplay(bj_lastCreatedMultiboard ,GetLocalPlayer()==Player(0)) After the creation and things done to the multiboard, and forget theGetLocalPLayer() if then else block |
| 06-20-2005, 06:58 PM | #4 |
Guest | I demand red rep. or I commit sepuku |
| 06-20-2005, 08:00 PM | #5 |
Negativity, stop being an ass or you will be banned (although, I get a feeling you have been through that before). |
| 06-20-2005, 08:18 PM | #6 |
Code:
Then - Actions
Multiboard - Create a multiboard with 11 columns and 3 rows, titled Statistics
Set Multiboard[1] = (Last created multiboard)
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Multiboard - Set the width for (Last created multiboard) item in column (Integer A), row 1 to 1.00% of the total screen width
Multiboard - Set the icon for (Last created multiboard) item in column (Integer A), row 1 to ReplaceableTextures\TeamColor\TeamColor01.blp
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Multiboard - Set the width for (Last created multiboard) item in column (Integer A), row 2 to 1.00% of the total screen width
Multiboard - Set the icon for (Last created multiboard) item in column (Integer A), row 2 to ReplaceableTextures\TeamColor\TeamColor00.blp
For each (Integer A) from 1 to 11, do (Actions)
Loop - Actions
Multiboard - Set the display style for (Last created multiboard) item in column (Integer A), row 3 to Show text and Hide icons
Multiboard - Set the display style for (Last created multiboard) item in column 11, row 1 to Show text and Hide icons
Multiboard - Set the display style for (Last created multiboard) item in column 11, row 2 to Show text and Hide icons
Multiboard - Set the text for (Last created multiboard) item in column 11, row 1 to Shield
Multiboard - Set the text for (Last created multiboard) item in column 11, row 2 to Health
Multiboard - Minimize (Last created multiboard)
Multiboard - Maximize (Last created multiboard)
[b]Custom script: call MultiboardDisplay(bj_lastCreatedMultiboard ,GetLocalPlayer()==Player(0))[/b]What did I do wrong this time? |
| 06-22-2005, 06:08 PM | #7 |
Sorry, bump. |
| 06-23-2005, 12:53 PM | #8 |
Okay I think I found out part of the issue. I can only use the Code:
Custom script: call MultiboardDisplay(udg_Multiboard[2], GetLocalPlayer()==Player(0)) Once in the game. It works fine untill I make a second one for Player 1, Player 2, Player 3, etc. If this is the case, then how do I make a multiboard for every player, so that each player sees thier own stats? Note: Sorry about the triple post..heh. |
| 06-23-2005, 01:04 PM | #9 |
create a board for every player in an array, hide them all, then do this: Code:
For each (Integer A) from 1to 8, do (Actions)
Loop - Actions
Set tempPlayer = (Player((Integer A)))
Custom script: if udg_tempPlayer == GetLocalPlayer() then
Multiboard - Show Multiboard1[(Integer A)]
Custom script: endif |
| 06-23-2005, 09:21 PM | #10 |
Perfect. Glad to finally get this working. Thanks again Toot. |
