Hi all !
I’m trying to implement a ready button in my lobby and depending on whether the player is ready or not I change the status image from red to green. For example, the Call Of Duty Black Ops 1 zombie lobby sums up what I would like to do.
In the GameMode of my lobby, there is an array of player controllers that feeds on each player that connects to the session.
In the GameState, I have all the names of the players that are ready in an array that is replicated:
In the widget, by clicking the ready button, I send the name of the client who is ready to the server:
When I get ready with the client that has the server, all the other clients get the information and can update their UIs to see who is ready. But when I get ready on a client that does not have the server, the array of player names that are ready (GameState) does not update because of “Has Authority” but if I remove it, it fits only for the client and not for all clients.
In short, I would like to know how to:
1 = Send the name of the ready player to the server
2 = The server updates the array of players who are ready
3 = Clients come to help themselves in the array to visually show who is ready
Thanks in advance for any help.