Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: AlekGavaj on October 08, 2021, 06:46:32 AM

Title: Level save
Post by: AlekGavaj on October 08, 2021, 06:46:32 AM
Hi!
My english isn't too good, but i try :)
I have a little problem with save game. So I created a level selector where i can select the unlocked levels. I use playerprefs set for save, and it works fine, it saves the levels even if I return the game, but the problem is, as I play again the first level, the levels I unlocked before are locked again. Seems like it overwrites the previous saves.
Thanks for your help!! :)
Title: Re: Level save
Post by: djaydino on October 09, 2021, 07:45:20 AM
Hi.
there is probably something wrong in you setup.

when your game starts, 1st you need to look if you one of you save keys exists.

Then if it exists, load your data.
if it does not exists you can save the default settings.

now when you for example unlock a level, make the change on the variable and save.

for your level selector, make sure it will setup "After" loading.