astronaughty's Forum Posts

  • 1 posts
  • Hello every1!

    I was trying to make an highscore, and watched alot tutorials and browsed here in the forum but nothing helped so i try it with an new topic

    -----------------------------------------------------

    Global Number: Highscore

    Global Number: Score

    On Start of Layout: Local Key "Highscore" Exist - Set "Highscore" to int(WebStorage.LocalValue(Highscore))

    ---Set Text to "Highscore" & Highscore

    (else)

    ---Set SessionKey "Highscore" to "0"

       Set Text to "Highscore" & Highscore

    Keyboard: On W pressed - Restard Layout

    Keyboard: On S pressed - Lear Local Storage

    Keyboard: On A pressed - Add 1 to "Score"

    Score > "Highscore" Set Local key "Highscore to "Score"

    Every Tick - Set Text to "Score: " & Score

    --------------------------------------------------------------

    Thank you,

    -Astronaughty

  • Try Construct 3

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

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