KillEmAllGameMode crashes engine

For some reason, when I use the KillEmAllGameMode it crashes every time I shoot. And I can’t move. I’ve checked the code and reviewed the whole video 3 times and everything is identical. Except the version… UE 26 is buggy. I do get an error saying:

LogGameState: Error: Mixing AGameState with AGameModeBase is not compatible. Change AGameModeBase subclass (KILLTHEMALLLLL_C) to derive from AGameMode, or make both derive from Base

As I was trying to check something my BP_KillEmAll cloned itself, I assumed I pressed Ctrl + W, but then I went into a different folder and pressed on the content folder in less than a second. The BP_KillEmAllGameMode file litteraly dissapeared. I think it’s unreal acting up or something. I just can’t use a different gamemode without crashing… Or It works but I can’t move the player. And it’s saying that I’ll cause data loss if I try to reparent the blueprint. Each time I’m about to finish a project, something has to happen to unreal…

I noticed my default gamemode the BP_ShooterGameMode was actually working as GameModeBase even though I’ve set it as BP_ShooterGameMode. Is this a bug?

Update:
The old BP_ShooterGameMode which we created at the start of the section was supposed to be parented to the c++ ShooterGameMode. I remember I did that 100%, but it seems something happened at all this time it was parented to GameMode. If I try to reparent it with either ShooterGameMode or KillEmAll I get a warning about something might not work and the game won’t work. At all. I tought creating a class from a class makes the new class inherit everything from the class it was made from. Am I wrong? Why is this breaking the game?

I’ve manage to sort it out.

It seems that when I created SimpleShooterGameModeBase C++ file I’ve made it inherit GameModeBase. I guess I’ve missed something. I had to change the inheritance in the header from AGameModeBase to AGameMode. Then I’ve deleted the KillEmAll c++ file, deleted Binaries folder to make sure Unreal updates the change, recreated the KillEmAll c++ file then reparented the BP_KillThemAll after restarting Unreal for the second time. Note that I’ve made the BP_KillThemAll as a separate Game mode blueprint so I can change between them if I ever want to implement different types of game modes.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms