Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

What is the difference between ServerTravel and OpenLevel?

I got to know the two functions However, you do not know the difference between the two functions


ServerTravel ex) GetWorld()->ServerTravel(FString("/Game/Maps/StrategyMenu"));

OpenLevel ex) UGameplayStatics::OpenLevel(GWorld, "battlemap", false, "");

Product Version: Not Selected
more ▼

asked Jun 12 '14 at 10:17 AM in C++ Programming

avatar image

21 3 10 16

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

OpenLevel calls SetClientTravel, which will disconnect any clients and act like a client. It throws away any state information and doesn't work with seamless travel

If you call ServerTravel on a multiplayer server, any connected clients will attempt to connect along with the server. It also allows the use of SeamlessTravel, which allows things like player controllers to stay alive across maps.

So basically use ServerTravel if you're a server and may have connected clients

more ▼

answered Jun 13 '14 at 09:17 PM

avatar image

[Epic]Ben Zeigler STAFF
1.3k 30 131 75

avatar image Omberone Sep 24 '14 at 08:28 AM

Question regarding that; does the new level re-create PlayerControllers for all clients?

avatar image Deventico Mar 03 '15 at 08:48 PM

I'd like to know that too...

  1. What happens to the old PCs, for example "LobbyPlayerController"? Can we access their data?

  2. Are new PCs created, specific to the current game mode?

  3. Same questions for game mode etc.

avatar image jwatte Sep 07 '15 at 04:34 AM

When using ServerTravel, all PlayerController, PlayerState, GameMode, and GameState instances are preserved. With OpenLevel, apparently these are thrown away and things are started "from scratch."

Also, ServerTravel will first load everybody into a "transition level" which is by default empty, and then it will load everybody into the target level. This is because there always needs to be an "active" world/level, so loading a new, big, level, while the old, big, level is still loaded, is bad for memory usage.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question