How do I create Local High Scores

0 favourites
  • 12 posts
From the Asset Store
Create the right kind of drama with Film Scoring Tools sound library!
  • I read the tutorials but can't seem to apply it for my own game. Here are the events for the page.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Watch this video

  • Line3 and Line4 are probably comparing a string to integer, this wont work. Use this instead (only if your Score variable is integer):

    Condition

    [System: Compare two values] int(webstorage.localvalue("HighScore")>Score

    Or use:

    Compare Key value (as number)

    See whether that helps.

  • I've look at the youtube link, and used it as a reference.

    DuckfaceNinja: At first I had it set to Compare Key Value (as number) so I changed it to the first option you gave me. The problem still seems persistent. The actual score appears but it doesn't get registered as the high score when its played for the first time. It is constantly blank no matter how many games are played.

  • Remove the action "set local key "HighScore" to 0" at the "on start of layout" condition !

    Make a ( local key "HighScore" does not exist > set local key "HighScore" to 0 ) instead!

    Also the line 3 condition should should check if the score is greater than the highscore and not otherwise.

  • I have something like this so far

    & heres what occurs

    13 would be my score for that current game but it doesnt register it as the highest score

  • Cuddle

    You need to change WebStorage local key exists to does not exist as you are setting the value to 0

  • I don't have that choice. Unless its an actual line

  • Use local key exists and than right click and select invert, a red x should appear before it, this is what does not exist means.

  • Here this is how you load the HS

  • Hello Everyone,

    I was checking the forums about setting a High Score. First of all sorry for my lack of knowledge on Construct 2 So my questions might seem funny but here I go. Is this going to work when I convert my game to ios app with ejecta or to android with CocconJs. I mean will the player be able to save his/her highscore when playing with his/her phone or tablet or will this only work only for HTML5 games.

    Kind Regards

    Volkan Kutlubay

  • http://construct2tutorial.com

    This guy has a good tutorial on high score but it is hit or miss on ios. I have a game coming out soon.

    And have used his scoring system. I would like to find a better one! So give this a go is u still need a test.

    Also keep me posted on ur game I would like to try it out when u are done

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