I’m facing some problems due my poor (for now) multiplayer programming and I need some help.
I have two players connected to a session, they should choose their avatar. When player clicks on “choose” button I check on GameState if all clients are ready. When all players have they chosen avatar, the game begins but… I want to show a countdown on both players. The “Start Game” event could be fired from client or server, it depends who choose it avatar later.
When a player is spawned the widget for the countdown is assigned to the PlayerState so when all the players are ready I call a function on GameState which starts the countdown:
The StartCountdown function:
And finally inside the widget, when the countdown is finished if it’s server I call ServerTravel. It’s supposed that both should run the countdown but only one ServerTravel is called.
The problem: it only works when is the server who make the last chooice and the other players dont see the countdown of his widget…