Local Storage resetting

0 favourites
  • 3 posts
From the Asset Store
Basic Plugins for Firebase Authentication, Realtime-Database, Firestore, Cloud Storage
  • Hi,

    Why everytime I run my game does my local storage with key "high_score" get reset? Shouldn't the key persist between executions of the game while developing?

    Regards

    S

  • Did you forget to recall the key and set it at the beginning of your loadout? Do you have any actions that clear storage in your event sheet? Are cookies/caches not enabled in your browser? Have you used the same localstorage name for two different games? Those are the only reasons I can think of that your local storage would be resetting

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank, got it working now. My issue was I am reading the high score into a global variable held in a separate event sheet which I am including in other layouts (not sure of this is necessary to have shared global variables across layouts). Because when I was testing I wasn't coming in via the home layout, I was testing the layout directly so skipping the read logic. Doh....

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)