SeamlessTravel: How does server know all clients are ready?
I'm trying to build a lobby/game configuration system that gathers users, and when the configuration is ready, start the game. I call SeamlessTravel on the server as a console command. I presume that all clients will follow this server and also load the target map.
However, how do I, on the server, know that all players have actually connected and are ready/replicating? I was thinking I could have each client send a to-server RPC when they start playing the level. However, if I wait for a message from a client, then if a client is faster at loading a map than the server, then the clients may send the message before the server is ready.
Or does "seamless travel" just take care of all this for me?
asked Sep 09 '15 at 03:56 AM in Blueprint Scripting
So, the answer I'm going with, is polling "Num Travelling Players" until it goes to zero. It's not perfect, but I can make it work. (Draw-backs includes that entities will be ticking while I'm still having the loading screen down.)
This is from my GameState blueprint; SetupPlayers is called from Event Begin Play in the Level Blueprint.
I know this question is fairly old but I noticed that there isn't any answer here that doesn't rely on a poll.
I think the best way to tackle (as you mention in a comment) is via a GameMode callback.
Unreal's client-server model is focused around the concepts of worlds and their GameModes. A dedicated server will sit listening on a particular map with a GameMode loaded. When connections happen, the GameMode gets the chance to reject or accept connections with
I think the callback that you are looking for is called
So overriding this will give the server a notification after a seamless travel has occurred.
Sam Pattuzzi - Co-instructor on the Udemy's Best Selling Unreal Course
Without just copying a pasting this answers everything.... https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Travelling/index.html
Have you checked into the advanced sessions plugin if your using bp's only? It gives you some additonal BP exposed OSS stuff but not a check "are all clients connected" AFAIK
youd probably want to have a game instance or player state boolean make sure everyone is in the level somehow maybe a get all start points and check if characters are overlapping, thats be my half-assed solution.
Let me know if this helps Don't forget to accept an answer that best clears your question up or answers it so when the community finds your question in the future via search/google they know exactly what you did to fix it/get it going.
answered Sep 09 '15 at 04:14 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here