GameState child of GameStateBase don't work

The child of GameStateBase made by Epic Games included on the engine don’t work:

If you make a new game mode and assing a pawn + gamestate blueprint based in GameState or direct GameState and set that gamemode to the map nothing work at play, just freeze in the air, the begin play strings don’t work and nothing work…

1 Like

Hey Hevedy,

If you are attempting to pair a base class with a non-base class (such as, say, using a Game Mode and a Game State Base), this will not work. These are only meant to be used in conjunction with each other. So, if you are using one Base class (GameModeBase) the Game State class must match (GameStateBase). If it does not, this can cause quite a few issues, including certain functions and events not being called in your blueprints.

If this is not the issue that you’re experiencing, please explain clearly what the issue is, and provide a detailed list of steps that I can use to reproduce the issue on my end.

Have a great day

Mmm not sure what you talk, I just said GameState and GameStateBase are the same class one child of other, are included in the engine:
GameStateBase (Parent)
GameState (Child)

If you make a GameState based in GameState child, and assing it in the gamemode don’t work. In Blueprints.

→ New Blueprint based in GameState → Add a Print To Screen text in Begin Play → Create a empty GameMode → Assign the GameState based BP to the GameMode → Create a character Pawn → Assign the created character pawn to the GameMode based BP class → Press Play → Begin Play don’t work

Thanks for the steps. I tested this on my end by doing the following:

  • Opened a third person project
  • Created a new game state
  • Added a print string on the game state’s begin play
  • Created a new game mode
  • Set the game mode to use the newly created game state
  • Went to Project Settings->Maps and Modes and set the new game mode to my default game mode
  • Played the game in editor and say my string appear

So this seems to be working correctly for me in 4.13, 4.14, and 4.15 (I tested in all three versions).

is your game state based in GameState or GameStateBase ?

With GameStateBase works, but with GameState no

It was based on Game State.

Make sure you aren’t using GameModeBase and GameState. If you’re using GameModeBase, you’ll need to use GameStateBase as well.

What is the default Gamemode created with the gamemode button ? I imagien then is the GameModeBase then ? Ok then probably that is why don’t work… Someone should note that the next time.

Yeah if you notice when you create a new blueprint the option is for Game Mode Base. This was a change implemented in 4.14.

Sorry to necro this thread, but I’ve seen so many people suffer from this issue.

Please tell the engine developers to follow up on this - clarify / prevent this issue - because it’s a killer for newbies. Extremely depressing to do a whole project and then realize we can’t change back, because of dependencies that won’t change anymore.

I just had this issue and found that my game mode was based on game mode base while my custom game state was based on game state. I changed the the parent to game mode instead by clicking ‘class defaults’ → changing the ‘parent’ drop down menu from game mode base to game mode. Fixed it for me.