higscore system... what am I doing wrong?

Get help using Construct 2

Post » Wed Jul 01, 2015 10:07 am

I would save the highscore with the localstorage, but each time I reboot the game, my variable resets to zero.

I already have a "coin saving system" that works well, I turned off during the time to set up my system to the score.

screen

Any Idea of what am I doing wrong?
B
7
S
1
Posts: 64
Reputation: 585

Post » Wed Jul 01, 2015 10:50 am

I'm not quite sure. But i think you should try saving the variable only after setting it's value.
B
17
S
7
Posts: 280
Reputation: 2,522

Post » Wed Jul 01, 2015 11:32 am

Thanks for trying to help but it doesn't work :/

Considering that i want to save more than one variable, I may have to do my saving system in other way. Should I?
B
7
S
1
Posts: 64
Reputation: 585

Post » Wed Jul 01, 2015 12:24 pm

You are responding to "Check item exists", but are you calling it in "On start of layout"? That's the only way any of those triggers will get called. Also, RayKi is correct, You save the highscore and then check if it changed and set it after storing it. The manual suggesting using a Dictionary to store multiple values.
ImageImageImage
B
71
S
22
G
247
Posts: 3,753
Reputation: 137,552

Post » Wed Jul 01, 2015 1:44 pm

All things I try are big fails... my mind is screwed :)

I will study how to store multiple values, then I'll start again from beginning.

Thank you two very much for help!
B
7
S
1
Posts: 64
Reputation: 585


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests