i’m having trubles with the servertravel command.
I am creating a multiplayer game and i still don’t know how to implement this command,
I tried many ways, I tried that the host could launch the command and it didn’t work,
I also implemented it in the game mode and it didn’t work either.
Things to consider:
I activated the seamsless travel in the travel map and others game modes
I tried to “for each” all the connected players and then run the function into the player controller
Also I tried to run the servertravel into the gamemode
i always packed the project in every attempt , the projects is made in EOS.
Does anyone know how to launch the command correctly or if there is something i am missing?
Edit: Non-Seamless ServerTravel is what is currently broken in UE5. Seamless ServerTravel does seem to work, but it’s not compatible with our game specifically.
If you are UE5, the command “servertravel” seems to be 100% broken currently for packaged games, I can’t speak to anything with only the Editor.
Our game is 4 years in development (Blueprints only); have never had an issue with servertravel.
Now, in our packaged game, the command no longer lets clients re-connect. They permanently drop. This isn’t even using our game code, this is just simply typing in “ServerTravel MapName?listen”, have also just tried “ServerTravel MapName”. Server travels fine, but now as of UE5, clients will never reconnect.
I highly recommend anyone using Blueprints to use the following method instead of ServerTravel as it will give you much more modular control:
When your Lobby is ready, send all the clients to a “transition” map by making each PlayerController call “Open Level”
This map can hold anything you like for a loading screen, requires no replication, and should load instantly for clients. The most important part here is that you are sending the SessionID as a variable into the TransitionLevel to guarantee clients know where to go after hanging out in the TransitionLevel.
When the “Send All Clients to Transition Map” is done, have the Server call “OpenLevel” of the actual map you want to go to. Or if you want, just have the Server also go to the TransitionMap but you’ll need to pass another variable reminding the GameInstance that that’s the server.
You can put some looping logic in the TransitionLevel’s blueprint to FindSession of the SessionID. Just keep searching reasonably if the SessionID you have saved exists. Then you can just JoinSession again, which is far more reliable than sort of Server Traveling or Seamless logic.
Benefits are you can have a nice loading screen, and you know that ever client is joining with a completely fresh PlayerController. Ideally ServerTravel would just work though.
I’m using UE5, Steam Subsystem and servertravel. Everything is working fine.
But let’s try to solve the problem:
It is crucial how you catch your clients
In my case, they are all in an lobby. So in the game mode I use “HandleStartingNewPlayer” and not “OnPostLogin”
The server travel command I use: servertravel/Game/Maps/Level01
(the first 2 will be the same. The rest depends on your folder structure and the last one is the level itself)
Make sure you added all needed Levels at the packaging options (advanced - Maps)
Hello, I also had the same problem when cooking the project in ue5.
In my case the problem was having the maps added in the project configuration.
As in ue5 the map selector of the project configuration does not work well, I have activated the option “Cook everything in the project content directory (ignore list of maps below)” and this has solved the problem of travel
Any updates on this? Still struggling to servertravel the clients when using non-seamless option (which we need for our design).
Clients just get disconnected in packaged game.
works properly if you test from editor using the “standalone game” option
does nothing in packaged game D:
Note that I toggled “use seamless travel” in my gamemodes and that I am using a transition map.
I am also calling servertravel from “execute console command” in blueprints