Player array in the game state has the wrong player state classes

As explained in the title, when calling “player array” from my custom game state I don’t get the classes I’m supposed to get. I have:

  • DeathMatchGameMode (child blueprint of my BasicGameMode which is a child of GameModeBase)
  • DeathMatchGameState (child of GameStateBase)
  • DeathMatchPlayerState (child of BasicPlayerState which is a child of PlayerStateBase)

I checked to have correctly set my game mode and its defaults

But on the server it still has the player state that I had in the previous level (which has a different game mode with different classes) and trying to print the player state class name (using a switch on authority node to differentiate between server and clients) confirm that on the server the clients don’t have the right class

234437-screenshot-99.png

That said, on the clients they do have the right class but they often don’t have other’s client references

234439-screenshot-100.png

I think I found the problem: I didn’t let the engine load and replicate the new objects.

A simple delay of half a second was enough to load everything properly.

1 Like

+1 thx for the answer saved me hours of work :smiling_face_with_tear: