Download

Synchronizing client startup in multiplayer

Hello again. I’m just starting to experiment with multiplayer and I’m confused about how to prevent a client from starting a level before all clients have joined. I have actors that move by updating their positions in the tick event handler - they are set to replicate / replicate movement. I’m launching using PIE in ListenServer mode (two player) and as soon at the primary client opens up the actors begin to move. When the second client starts up the actors in that client start moving from their starting positions, so they are well behind the actors in the primary client and never catch up. I have another actor that only moves on a keypress event (so not moving when the level starts) and it replicates perfectly to both clients.The level is the start level - I haven’t implemented a lobby or main menu level yet.

It seems I’m missing some sort of synchronization to not tick the actors before everyone joins, but I’m not sure what that could be. I have tried implementing the ‘ReadyToStartMatch’ in my GameMode based on the number of players, but that doesn’t seem to have any effect. Can someone suggest something or give me a link to an explanation of how to prevent a level from starting (actors ticking, mostly) before all players have joined / loaded the level? Or set me straight if I’m way off base?

Thanks