Restart Layout resets global variable and Webstorage

0 favourites
  • 8 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • Hello,

    I'm trying to get High score to work on my game but it keeps disappearing when I reset the layout.

    I've tried setting 'global variables' and setting 'text to show the variable' after the 'reset layout' but it seems like the 'reset layout' function keeps resetting the global variable as well.

    So I tried webstorage but I still am getting the same problem.

    What I'm trying to do is having the Highscore save forever and update when I get a better highscore.

    Can someone please help me?



  • Does it work now ? (It's really hard ! Can't get more than 2, so it was very difficult to verify ! )

    Well you edited as fixed so I removed the file

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks

  • so...why you guys deleted the capx hehe

    i need to know what you did...i have a GLOBAL Variable "HIGHSCORE" and i want to use that VAR as a Savegame Score so after you restart the game, it shows the previous HighScore...but i dont know how to...

  • nanitoz Attach your capx, I'll have a look at your system. removed is capx because it's his project, with arts and audio from his team

  • i got this

    at this moment im just testing it Chrome, but it will work on Android then?

  • Saving and loading in the same event ?

    Si if Highscore is initiate at 0, you save it at 0 and load it at 0, it will always be at 0.

    Save it at the end of the game, and load it at start of layout.

    It will works on android

  • that was an example how Loading/Save works xD! just i put it together...hehe


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