[Score] How do I move score between layouts?

Get help using Construct 2

Post » Sat Jul 26, 2014 6:37 am

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.
B
34
S
10
G
4
Posts: 93
Reputation: 4,036

Post » Sat Jul 26, 2014 7:02 am

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
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: ketramtu18 and 11 guests