Can anyone help Im really struggling with complex saving problem on my game?

I just want to make a auto save & load system for: Total coins collected/ unlocking a character on another scene with coins/ then save system so that the character was last choose should be there when reopening the game.

I know how to do it but its getting too complex for me, can anyone tell a neat way of doing this, it would be really appreciated

Right now the problem im having is: My save system is like: Every time player dies 11

And at beginning of the scene when=each time level is restart 22
but after this when I go to player selection scene and there I unlock a character for 20 coins reduced from my Total Coins(global variable), then my Total Coins(Global Variable) are reduced but how do I update it in the original game and save it???

What’s stopping you of writing TotalCoins(global variable) to storage when you reduce it?

1 Like

Tired it, Its simple & works better than what I was doing, I don’t know why it didn’t came across my mind, thanks.

Im new to this, can you also tell how do save player selection that is on “Menu” scene and when my game closes & restarts next time it loads the same player on “Game” scene?

Separately, make sure you’re not saving to variables with spaces in the name. That can work in storage locations, but can break normal variables in the engine in most cases.

1 Like

Put the choices into variables and save them just like you did with Total Coins.

Check out this tutorial by WishForge games on storage - it’ll probably be better info than what I can jot down in a message.

1 Like

Use total_coins or TotalCoins for the names of your variables.
Underscores notation like total_coins
Camel case notation Total_Coins