playMaker

Author Topic: Unlocking stuff using PlayerPrefs  (Read 2131 times)

jayf

  • Playmaker Newbie
  • *
  • Posts: 40
Unlocking stuff using PlayerPrefs
« on: December 31, 2014, 09:51:59 PM »
Hi.

I'm trying to make the player unlock stuff after reaching a certain level. I have a Global Integer counting down the levels the player has reached. For example, it adds 1 to a Global Integer each time the player solves a level. Let's say at level 4 you unlock something. I make "Player Prefs Get Int" save this Global Integer score into it's own variable, an Integer called "lvl4 unlocked". From there I have objects compare it to themselves, telling them when to "unlock" or be available.
It works basically, however after I leave my iPad for a while, the unlocks are gone and the player would have to unlock them again. According to the tutorial on PlayerPrefs, they should be able of saving stuff long term or so. Is there anything else I'm missing?

xhidnoda

  • Full Member
  • ***
  • Posts: 231
Re: Unlocking stuff using PlayerPrefs
« Reply #1 on: January 27, 2015, 03:27:21 PM »
Same problem here....  >:( >:( >:( >:( >:( >:( >:( >:( >:( >:(

rik

  • Full Member
  • ***
  • Posts: 246
Re: Unlocking stuff using PlayerPrefs
« Reply #2 on: January 28, 2015, 05:03:53 AM »
if you are using this for loading levels i prefer you to use mad level manager
i was using this and it has playmaker actions built in .it works flaw less in android devices

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Unlocking stuff using PlayerPrefs
« Reply #3 on: January 28, 2015, 05:40:09 AM »
"set int" is to save "get int" is to load