- Joined
- Aug 8, 2012
- Messages
- 154
Hey there!
So in my map each player has their own local multiboard which works fine, and shows them their own stats (kills, deaths, health, etc...).
However, I recently tried to make a different multiboard which can be accessed via the player pressing the Escape key. I used the same sort of GUI that I did for the other, and it works fine in single player, one multiboard replacing the other whenever the player presses escape.
Here is the trigger (without the value checking for kills, etc, being as that is not needed for the help):
When more than one player accesses this multiboard, however, they are disconnected. This is most likely down the the GetLocalPlayer() in some way or another, but an almost identical trigger worked perfectly in multiplayer without issue.
Can anyone please tell me what I am doing wrong, and how to fix this so that each player can access the multiboard without disconnecting?
Cheers in advance!
P.S: Here is a demo map with just this trigger and the ones for the other multiboard that does work:
View attachment Multiboard testmap.w3x
Hope that helps!
Maldruzard
So in my map each player has their own local multiboard which works fine, and shows them their own stats (kills, deaths, health, etc...).
However, I recently tried to make a different multiboard which can be accessed via the player pressing the Escape key. I used the same sort of GUI that I did for the other, and it works fine in single player, one multiboard replacing the other whenever the player presses escape.
Here is the trigger (without the value checking for kills, etc, being as that is not needed for the help):
-
Create leaderboard
-
Events
- Player - Player 1 (Red) skips a cinematic sequence
- Player - Player 2 (Blue) skips a cinematic sequence
- Player - Player 3 (Teal) skips a cinematic sequence
- Player - Player 4 (Purple) skips a cinematic sequence
- Conditions
-
Actions
- Set TP = (Triggering player)
- Set TPU = (Player number of (Triggering player))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Leaderboardbool[TPU] Equal to False
-
Then - Actions
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
- Custom script: if GetPlayerSlotState(udg_TP) == PLAYER_SLOT_STATE_PLAYING and GetPlayerController(udg_TP) == MAP_CONTROL_USER then
- Multiboard - Create a multiboard with 4 columns and 5 rows, titled WarZ Leaderboard:
- Set Leaderboard[TPU] = (Last created multiboard)
- Set Leaderboardbool[TPU] = True
- Multiboard - Hide Leaderboard[TPU]
- Multiboard - Set the display style for Leaderboard[TPU] item in column 1, row 1 to Show text and Hide icons
- Multiboard - Set the display style for Leaderboard[TPU] item in column 1, row 2 to Show text and Show icons
- Multiboard - Set the display style for Leaderboard[TPU] item in column 1, row 3 to Show text and Show icons
- Multiboard - Set the display style for Leaderboard[TPU] item in column 1, row 4 to Show text and Show icons
- Multiboard - Set the display style for Leaderboard[TPU] item in column 1, row 5 to Show text and Show icons
- Multiboard - Set the display style for Leaderboard[TPU] item in column 2, row 0 to Show text and Hide icons
- Multiboard - Set the display style for Leaderboard[TPU] item in column 3, row 0 to Show text and Hide icons
- Multiboard - Set the display style for Leaderboard[TPU] item in column 4, row 0 to Show text and Hide icons
- Multiboard - Set the icon for Leaderboard[TPU] item in column 1, row 2 to ReplaceableTextures\CommandButtons\BTNVillagerMan.blp
- Multiboard - Set the icon for Leaderboard[TPU] item in column 1, row 3 to ReplaceableTextures\CommandButtons\BTNVillagerMan.blp
- Multiboard - Set the icon for Leaderboard[TPU] item in column 1, row 4 to ReplaceableTextures\CommandButtons\BTNVillagerMan.blp
- Multiboard - Set the icon for Leaderboard[TPU] item in column 1, row 5 to ReplaceableTextures\CommandButtons\BTNVillagerMan.blp
- Multiboard - Set the width for Leaderboard[TPU] item in column 1, row 0 to 8.00% of the total screen width
- Multiboard - Set the width for Leaderboard[TPU] item in column 2, row 0 to 6.00% of the total screen width
- Multiboard - Set the width for Leaderboard[TPU] item in column 3, row 0 to 6.00% of the total screen width
- Multiboard - Set the width for Leaderboard[TPU] item in column 4, row 0 to 6.00% of the total screen width
- Multiboard - Set the color for Leaderboard[TPU] item in column 1, row 0 to (100.00%, 100.00%, 0.00%) with 0.00% transparency
- Multiboard - Set the text for Leaderboard[TPU] item in column 1, row 1 to Survivor Name:
- Multiboard - Set the text for Leaderboard[TPU] item in column 1, row 2 to (Name of Player 1 (Red))
- Multiboard - Set the text for Leaderboard[TPU] item in column 1, row 3 to (Name of Player 2 (Blue))
- Multiboard - Set the text for Leaderboard[TPU] item in column 1, row 2 to (Name of Player 3 (Teal))
- Multiboard - Set the text for Leaderboard[TPU] item in column 1, row 2 to (Name of Player 4 (Purple))
- Multiboard - Set the text for Leaderboard[TPU] item in column 2, row 1 to Z-Kills:
- Multiboard - Set the text for Leaderboard[TPU] item in column 3, row 1 to Murders:
- Multiboard - Set the text for Leaderboard[TPU] item in column 4, row 1 to Deaths:
- Player Group - Add TP to PlayersPlaying
- Trigger - Add to PlayerLeave <gen> the event (Player - p leaves the game)
- Custom script: endif
-
Loop - Actions
-
Player Group - Pick every player in PlayersPlaying and do (Actions)
-
Loop - Actions
- Set TP = (Picked player)
- Set TPU = (Player number of (Picked player))
- Custom script: if ConvertedPlayer(udg_TPU) == GetLocalPlayer() then
- Multiboard - Show Leaderboard[TPU]
- Custom script: endif
-
Loop - Actions
-
Player Group - Pick every player in (All players) and do (Actions)
-
Else - Actions
- Custom script: if ConvertedPlayer(udg_TPU) == GetLocalPlayer() then
- Multiboard - Hide Leaderboard[TPU]
- Multiboard - Show MB[TPU]
- Set Leaderboardbool[TPU] = False
- Custom script: endif
-
If - Conditions
-
Events
Can anyone please tell me what I am doing wrong, and how to fix this so that each player can access the multiboard without disconnecting?
Cheers in advance!
P.S: Here is a demo map with just this trigger and the ones for the other multiboard that does work:
View attachment Multiboard testmap.w3x
Hope that helps!
Maldruzard