0 Favourites

[Score] How do I move score between layouts?

  • Hello guys!

    I am trying to make a scoring system. I have a score on the layout that has the actual gameplay, but I also have a "Game Over" layout that I would like the final score from the gameplay layout. The scoring is very similiar to Flappy Bird, where once the character goes over an object, it adds +1 to the score.

    I need to be able to have the final score from the game copy over to another layout.

    Also, once this is worked out, I would like to implement a high score that saves the high score on the particular device. Meaning, when I play the game at another date, would like for it to keep my high score from a previous date.

    Any tips on getting the scoring to work right? I have tried numerous things, including trying to do a global variable, but can't seem to get it to work right. I can only seem to get the instance variable to count the score.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Use a global variable for the score and use webstorage to save it..

    global variable score

    global variable highscore

    Character is overlapping object

    trigger once - system add 1 to score

    (subevent)

    score > highscore - highscore set value to score

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
564 105,209
rexrainbow's avatar
rexrainbow
Unread hot topic
99 10,137
karshinkoff's avatar
karshinkoff
Unread hot topic
132 29,591
chadorireborn's avatar
chadorireborn