I failed miserably with my attempt to store variables inside my custom character class. When the level changed, I did not have access to my variables anymore. As a workaround I used a savegame, which worked, but is obviously not ideal.
My objective is to have a place to store variables and have them persist throughout the entire application runtime. I login users on one level, change levels to a play map, then change back once play is complete.
Can anyone point me in the right direction to do the variable storage part? Do I need a custom gamestate? Something else?
Any links to tutorials or documentation on this topic would be welcome.
I’d like to keep this in c++ as much as possible.
Thanks!