Hello, I’m trying to have all of my players to spawn at the same time on a map after a server travel.
To do this I count how many players have loaded the map in the PostLogin event of the gamemode and when they are all here I start an event in the gamemode to spawn and posses them.
I works fine in PIE and standalone, but in a packaged build, the server spawns rather instantly but all the clients takes 2 to 3 secs to spawn afterwards. I suppose it’s the time for replication since posses function is server side. But my question is how do I make everyone spawn at the same time then ? How do I know when a player controller have actually possessed their pawns ?
You have to start thinking about individual client load times and latency. Clients do not instantly load a map like in PIE. It’s read from drive, decompressed, processed, loaded to memory. This takes time. Hardware and software on each client has a direct impact on this.
Solution is to have the clients report back to the controller when they are ready. Controller can call an RPC event on the server-side controller which can communicate with the GM.
In my head OnPostLogin was fired when the client had loaded the map. But now that I think about it, it just makes no sense since gamemode is only server side. Thanks for the help !