Player state not valid after ServerTravel

TheFlow3k
Mon, 26 Oct 2020 02:55:56 +0000
Multiplayer & Networking

Hello, I have a problem in a multiplayer game and player state.

Actually I do server travel with seamless travel from a lobby-level to gameplay-level. Often everything works fine, but sometimes on Clients they somehow do not have a valid playerstate. I think same for game state, but let’s focus on player state first.

I do nothing curios in the BP, just check the playerstate in playercontroller. Which is a default replicated variable and normally hold the playerstate of the player.
And even by simply checking for validity (before casting it) I get an error player state is not valid.

I read already that this can happen in first frames after level change. But as you see in my log screenshot, this happens (when the error occur) still after 15 seconds, doing a valid player state check every second.

Any help is greatly welcome.

facts:

only happens sometimes (but too often)

player state is invalid by just doing a validity-check on default “player state” variable in player controller

after servertravel

steam as online subsystem

occurs mostly not in stand alone game, but when game is published to steam and played in real steam environment

One answer thread I found says:
“In the lobby set the Playerstate to the default one, not the custom one.”
Ist that right that using same player state on server travel (with or without seamless travel) can make problems?
I tried it, but was no solution for me. Same problem occurs.

I found more thread about it, but nothing really as solution.

(no solution) Player State: None on multiplayer clients - Programming & Scripting - Unreal Engine Forums

diferent PlayerStates for Lobby und
Game?) Player state invalid after seamless travel causing destroy session - Multiplayer & Networking - Unreal Engine Forums

(UE4 Bug) Player state sometimes not valid for second player - Blueprint - Unreal Engine Forums

(PS just need some time to access on clients) Client Playerstate in HUD sometimes invalid - UI - Unreal Engine Forums

(relation to End Play which I do not use) Multiplayer Invalid Playerstate - Platform & Builds - Unreal Engine Forums

(thread some one describes that PlayerState get lost on only one side (client or server), but stopping for real explanation or solution) https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/42419-replicating-playerstate-issue

12 posts - 8 participants