Hi there! It’s me, back at it again in the Gdevelop forums! Right after fixing my last issue (Random coins falling from defeated enemies) I’ve hit another snag. Truth be told, these were things I was avoiding for a while because of my confusion with them, but. Here we are.
So essentially, I’m finally implementing a save/load system into my game. My Global Variables look like this:
I used This Tutorial on youtube to learn how to do more complex saving, which is why I put everything under a single Structure.
This is my scene variables in my ‘Farm’ scene. Your character lays down on a hammock, and triggers the save. Then once you die, or once you reload, you start back at this location.
And this is my very simple code in my ‘Title Screen’ scene. These are the only times saving/loading is included in my game, and I know this because I finally got off my butt to work on saving/loading today.
I’ve found some odd things when I load my saved game. I see some evidence that yes, it was saved. But other evidence of things that were not.
For example: I would turn off SoundEffects in a scene. I would also defeat some enemies, and pick up some Money. Then, I would break down a barrier (ForestDestroyBarrier, under the Quest section). After that, I would save, and restart the game.
When I restart the game, the barrier is still destroyed, but the sound effects are back on, and my money is back down to zero. I am pretty befuddled at what the cause could be. I’m probably missing something simple, but I have no idea the right questions to ask, besides just, explaining the entire issue I’ve found.
Thanks again in advance you guys!