Download

Multiplayer Question: Run event to all connected players

Hi All!!

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:

bcb41db8d38a2d6ed903370bb87fabe5cd1b7f23.png

The StartCountdown function:
2fe9ac96771a26b283d23700d6904b9120cc0327.png

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.

77594de37a9c609dec8cef6a2ee075df47f15b42.png

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…

Any idea??

Thanks!

Hi. Server travel (probably) wont work on 1 machine. Epic made tutorial but tested server travel on pc + laptop…
However, some months ago it was probably bugged and it worked for me… so no idea whats true.

Hi!

Server Travel is working properly. My problem is when both player are ready, the countdown only runs on server side, clients does not see it.

thanks