Download

CustomGameState breaking character?

I’ve got an empty CustomGameState, which inherits from AGameState. I assign it in my GameMode init func:



GameStateClass = CustomGameState::StaticClass();

No compile errors, but when the game starts my character seems to be stuck? Or the game is paused?
I can’t tell what is going on.

Any help/pointers would be greatly appreciated !

Game State is for replication uses In the Game. That is how you will move information from the server to the clients, So clients will get the info PROPERLY from the server. Your player controller is what moves you around. make sure you have it added. have you extended player controller with your own class? if so then in the constructor put in



PlayerControllerClass = ATestPlayerController::StaticClass();


use your name of your player controller class for this > ATestPlayerController and you should be able to move around. This should get you started in the right direction to getting your player moving. Also remember that the controller must posse a pawn or character so you can see a 3rd person in game. Hope this helps

Hey gamepainters! It turns out that CustomGameMode and CustomGameState need to inherit from the same relative class, ie GameModeBase and GameStateBase or GameMode and GameState.
I didn’t realise this at all, until a few moments ago. Not sure that is explicitly said in the docs, but as soon as I switched them to match up using AGameMode and AGameState, it worked fine.

I don’t understand why this is the case, or what was happening previously where the game would start but appeared “frozen” :S

At least you solved it. good job.