How to stop varible resetting on map change

Hi I have a bool in my gamemode class, I want it to check if the player is dead when the map changes, but the variable gets reset on the map change. How can I do this?

Put it in the game instance instead :slight_smile:

I don’t know anything about using it in C++, but there must be an avalanche on youtube for that.

The main thing is you need to specify it in your project settings, ‘maps and modes’ section.

How do I go about that as I can’t seem to get itnto work and can’t find anything to do with c++

Thank you for the help, I’m having so issues with setting it all up so far it seems like this is the solution