Highscore problems & questions

Get help using Construct 2

Post » Sun Jan 25, 2015 1:50 pm

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
Image

Game Over Event Sheet
Image
"If you don't build your dream, someone else will hire you to build theirs"
B
12
S
3
G
1
Posts: 57
Reputation: 913

Post » Sun Jan 25, 2015 11:35 pm

Make Score>HighScore a sub event of On start of layout
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Mon Jan 26, 2015 6:30 pm

briggybros wrote:Make Score>HighScore a sub event of On start of layout

No difference :|
"If you don't build your dream, someone else will hire you to build theirs"
B
12
S
3
G
1
Posts: 57
Reputation: 913

Post » Mon Jan 26, 2015 6:38 pm

You're setting the webstorage value to the string "Score" instead of the variable Score.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,620

Post » Tue Jan 27, 2015 7:08 pm

ramones wrote: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.
"If you don't build your dream, someone else will hire you to build theirs"
B
12
S
3
G
1
Posts: 57
Reputation: 913


Return to How do I....?

Who is online

Users browsing this forum: Magistross, tarek2 and 2 guests