How to use ServerTravel in Blueprints?

Hi all,
I am at a loss trying to get ServerTravel to work. I know it’s not exposed to Blueprints and that it can only be executed via C++ or command line, but how would I even go about that? What’s the syntax I use for ServerTravel, and how do I make it run on server? Where should I put the node and how do I make sure that it runs on the server, not the client?

Thanks!!

1 Like

Hello cnClockwork, to do a servertravel there are a few things you want to make sure you have setup correctly.

  1. Make sure you have SeamlessTravel enabled if you want to bring your clients along with you, otherwise when you execute ServerTravel the clients will be “left” behind so to speak and disconnect. This is found in your gamemode blueprint.

  2. For executing ServerTravel you will use the node “Execute Console Command” and inside of it you will put "ServerTravel ". This can also be executed on the command console itself.

  3. Please note for the above, the server has to execute the command. If you are a client trying to execute a ServerTravel command nothing will happen. In blueprints this means you will have to “add a custom event” and chose “Run on Server” under the Replicates tab. You will have to use the custom event feature if you running a dedicated server. The command will work though if you are running a “Listen Server” where one client is hosting.

As you start to dive into networking/replication I would take the time to look over the UE4 Blueprint networking tutorial. It is a few youtube videos that cover a lot of the basics. You can find it here. Blueprint Networking Tutorials - Unreal Engine

4 Likes

Thanks so much for your reply!
You definitely sent me on the right path. It took a while, but I had to change some stuff in the DefaultEngine.ini file. I also had to use the ?listen command at the end of the command node.

Could you please share what you changed in DefaultEngine.ini?

Regarding your first point, that’s incorrect. ServerTravel can be used without SeamlessTravel enabled, i.e ServerTravel can be a non-seamless travel without leaving any client behind.