How to pass data on seamless travel using Copy Properties for two different Player State blueprints using a parent Player State blueprint

Im new to unreal and have been banging my head against the wall for the past few days trying to understand this, if anyone can help it would be appreciated.

I have a lobby and core blueprints setup.

Lobby GM:
image

Core GM:
image

I have implemented seamless travel with a transition map. When players join the lobby, all set ready, a timer triggers and at its conclusion I call:

image

What I cant get to work is transferring data from player state blueprints BP_LOBBY_PS to BP_CORE_PS. I understood that to transfer data from two different player states I need to use a parent player state class which both inherit from, is this correct?

What I have tried is:

Created a parent blueprint for both player states BP_PLAYER_STATE and then recreated both PS as children of the parent.

Then I override the copy properties event. This event is called when seamless travel is executed (Its an example with a created player name variable inside the parent blueprint, im aware player name already exists).

When debugging the new Player State is always BP_LOBBY_PS which obviously doesnt match BP_CORE_PS.

I have tried casting to both child blueprints and parent blueprint.

I have tried to get the actor of the player state and try casting to the parent, but this returns null.

Should I be setting both player states to the parent inside the game mode blueprint class defaults? and if so how would that work when working with the child blueprints.

Thank you in advance for taking the time to answer my question.

1 Like

In case anyone stumbles across this post with a similar issue. The solution was to change the Play Mode to Standalone Game, instead of what I was originally using, New Editor Window. So you can have a parent PlayerState class with two children and then set the parent using the example I included in my original post.

image

If your CopyProperties event is never called its likely your performing a hard travel instead of a seamless travel. Ensure seamless travel is enabled in the appropriate Game Mode(s) class defaults and make sure you have a Transition map created and referenced in your Project Settings - Maps and Modes.

image

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.