I am developing a lobby system and I want to add the “ToggleReady” functionality. When the UW_BaseButton_ToggleReady button is clicked, the Ready boolean value in the PlayerLobbyInfo structure of the PlayerState class for the corresponding player needs to be changed. I am new to multiplayer development, I need help on how to integrate and implement this functionality.
My initial plan was to create an OnServer event in the PlayerController, access the PlayerState of the specified PlayerController in the GameMode to change the relevant value, and then use RepNotify to update the player’s HUD when the structure’s value changes. However, when I attempted to implement this, only the server’s Ready variable value changed, and when I tried to check this value for active clients using the GameMode, only the server’s value appeared as true.
LobbyHUD:
LobbyPlayerController:
LobbyGameMode:
MainPlayerState:
Can you give me an idea how I can do this?