playMaker

Author Topic: Level save  (Read 544 times)

AlekGavaj

  • Playmaker Newbie
  • *
  • Posts: 8
Level save
« 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!! :)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Level save
« Reply #1 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.