Highscore problems & questions

  • I'm trying to get local highscore work on my game but I have a few problems:

    - 'Score' is saved to 'Highscore' but for some reason the condition "Score>Highscore" is ignored, so now the HS resets to the score of the last game, even if it was lower than the previous score.

    - I have several different stages in my game and would like each stage to have their own highscore. What would be the best way to get this work?

    - When I close the "session" (browser window), highscore has reseted to 0. Is this just because it's in preview mode or do I need something else than local storage to get scores saved into more permanent memory?

    I have my Game Over screen on a different layout and reset the scores there. Here a screenshot of my events:

    Game Event Sheet

    Game Over Event Sheet

  • Make Score>HighScore a sub event of On start of layout

  • Make Score>HighScore a sub event of On start of layout

    No difference

  • You're setting the webstorage value to the string "Score" instead of the variable Score.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You're setting the webstorage value to the string "Score" instead of the variable Score.

    Thank you! Finally got it working like wanted.

    Was about to lose my mind here, I tried like 3 different ways to do the same thing but of course in the end it was something small like that.

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