CopyProperties not working as expected

Good Evening,

I want to set the player name before the player enters the multiplayer session. For that, I am filling the Playerstate->PlayerInfo->PlayerName within the “JoinMenu”:

As for what I have understood I also need to CopyProperties Override which looks like this. Notice, the PlayerInfo is marked as editable and is replicable:

Finally, within the GameMode on the function OnPostLogin, I want to retrieve the game states with the previously filled names.

So why aren’t the Player Names being saved during the open command?

Any updates on this via blueprint? Did you got this to work? If so, how you did it?

Hi, its absurd, before 4 or 5 days I came to the same problem again. And it seems like this function gets only called if you use seamless travel. So what I now did was to use the game instance to store the things upon game session entrance. (GameInstance → PlayerState).
After the Host launches the game via seamless travel the copy properties function is getting called. (PlayerState → PlayerState)

For what this is worth to you, it’s only called by seamless travel because there’s no concept of old/new in standard travel. The previous map’s objects no longer exist, so there’s simply nothing to copy from, making a copyProperties or overrideWith call kinda pointless.

The tooltip could definitely say that, though. That’d help a bit.

Good to hear some clarification about that. I totally agree with you this information in a tooltip, would have saved me some time :wink:

It doesn’t look like you need to implement both, either. I’m just using copyProperties and everything is working as expected, so my guess is using both would probably set up a race condition and invite trouble.

Ok. This is also my current solution. Just using CopyProperties works like I have discribed on Mar 27 '19 at 3:03 AM. The method from the initial post was mostly refactored.

I am so close to getting this to work. I think I must misunderstand something about seamless travel. Do you happen to have a link to your source code where you did this that I could look at? I have nearly the exact same setup as you and I enabled seemless travel, so when I start the session and do OpenLevel, idk why my copyproperties is not getting called

You need to be using ServerTravel, not OpenLevel, to move to your next map. CopyProperties (and OverrideWith) won’t be called during a non-seamless map change.

If you’re using Blueprint, ServerTravel isn’t exactly exposed natively; you’ll need to use an Execute Console Command node to fire the servertravel [map name here] command. This only needs to be done once, on the server, so your GameMode is a good place for the logic.

Alternatively, you can use Rama’s Victory plugin (https://github.com/EverNewJoy/VictoryPlugin), which creates a Server Travel node you can use instead of the Execute Console Command node. The same rules apply: call it once, on the server.

1 Like