How to change what persists during Seamless Travel?

Stream your levels. Level streaming ue4. Unload and load your levels. GGWP.

Hi,

We changed our multiplayer project to use Seamless Travel when we call ServerTravel. We set an empty transition map and it seems to work so far.

However, we do not want everything to persist, so how can we change that (in Blueprints, if possible)?

So far we only found hints that we could override GetSeamlessTravelActorList, which seems not to be exposed to BPs, or change the CopyPriorities of the respective actors…
Can we achieve it in BPs?

EDIT:
This is what the documentation says:

When using seamless travel, it’s possible to carry over (persist) actors from the current level to the new one. This is useful for certain actors, like inventory items, players, etc.

By default, these actors will persist automatically:

The GameMode actor (server only)
Any actors further added via AGameMode::GetSeamlessTravelActorList
All Controllers that have a valid PlayerState (server only)
All PlayerControllers (server only)
All local PlayerControllers (server and client)
Any actors further added via APlayerController::GetSeamlessTravelActorList called on local PlayerControllers

And, since we want to change the GameMode upon level change (means Server Travel), we do not want these actors to persist…

So you mean no ServerTravel at all, just exchanging levels with the help of steaming?

Alright, I looked into this option, but it seems not to fit our game.

We have different GameModes we use alterning for all levels. And as it seems, if we just unload and load our levels we can not exchange the GameModes that easy…

So, ServerTravel it still is…

We had thought of this, but to combine 7 different BPs into a single one (and doing the same for the PlayerControllers, as well) would result in a terrible mess. So far, we still hope to avoid it…

maybe instead of combining them in the same event graph, you could put their code in separate actors, and spawn the actors from a game mode based on an enum switch.

are the player controllers really all that different from each other? maybe those differences could be refactored into separate actors or components.

Another way would be to delegate the functionality from the event graph to several functions, to keep everything clear and easy to maintain. And yes, the enum switch would be the way to go, if we have to work with only one GameMode.
However, we still hope to avoid it. We already tried hard to work with inheritance, separating what is require in all/multiple GameModes and what is specific. It would not be very elegant to change all that, although there might be some decent ways… :slight_smile:

That is true, the PlayerControllers actually are not that different from each other. Rather the PlayerStates, as we need different kind of data for each GameMode, but since that are mostly only some variables, that should not be a big deal.

And thank you for your time, by the way! We appreciate it. :slight_smile:

From my understanding, GameMode will change as usual also when using Seamless Travels, simply the old GameMode will be used to initialize the new one when the engine will call the CopyProperties method.

As far as I know, there are also CopyProperties methods for other Actors/Classes. Is it possible to override all those and, thereby, to “emulate” non-seamless travel, despite using seamless-travel?
Or would it be better to manipulate the GetSeamlessTravelActorList?