PlayerController not changing with level during Seamless Travel

Sorry for not updating at the time. I was very busy. :slight_smile: But if memory serves, it was the GameMode check on line 15 of that snippet that was not succeeding, presumably because the game mode was not ready yet. If I remember correctly, this is a problem because my desired effect was taking place in the level blueprint’s BeginPlay, and the timing on that is tight–the level’s BeginPlay isn’t guaranteed to wait until all player controllers or even the server player controller is converted. At least I assume, because it wasn’t. :slight_smile:

Let’s say the behavior I wanted in the level blueprint’s BeginPlay was to call a function Func(). Initially I had the BeginPlay event node feed right into a Func node. That’s when I was having the problem.

My solution was to wrap the function call in a delay loop.

If the cast to my controller class fails, I delay and try again. Probably you want some default case to take over after a few failed tries. For us, it always succeeded the second time around.

Hope that helps!

1 Like