How do I use the LocalStorage Plugin?

Get help using Construct 2

Post » Wed Jul 29, 2015 10:59 am

thank you so much AndreasR, it's work!
B
8
S
1
Posts: 16
Reputation: 483

Post » Wed Jul 29, 2015 4:05 pm

Borneo Code wrote:thank you so much AndreasR, it's work!


Awesome news :) You're welcome :)
Image Image iTunes: Match3 | Google Play: Match3
B
109
S
39
G
31
Posts: 1,175
Reputation: 29,314

Post » Wed Jul 29, 2015 5:38 pm

https://www.dropbox.com/s/xts5c0skst2f5 ... aproj?dl=0

I am actually using the Local Storage, but i just called it WebStorage. I forgot to add a reset button so if you do, i'm pretty sure it takes the high score back to 0 too.
B
12
S
3
Posts: 129
Reputation: 1,131

Post » Wed Jul 29, 2015 5:47 pm

firezombie444 wrote:https://www.dropbox.com/s/xts5c0skst2f5r6/New%20project.caproj?dl=0

I am actually using the Local Storage, but i just called it WebStorage. I forgot to add a reset button so if you do, i'm pretty sure it takes the high score back to 0 too.


Please save as 'Single File' instead of saving as a project. I can't open the uploaded file. It must end with .capx
Image Image iTunes: Match3 | Google Play: Match3
B
109
S
39
G
31
Posts: 1,175
Reputation: 29,314

Post » Wed Jul 29, 2015 5:53 pm

Oh, sorry. Here's the single file. https://www.dropbox.com/s/296as2rrrem6z ... .capx?dl=0
B
12
S
3
Posts: 129
Reputation: 1,131

Post » Wed Jul 29, 2015 6:06 pm

firezombie444 wrote:Oh, sorry. Here's the single file. https://www.dropbox.com/s/296as2rrrem6z ... .capx?dl=0


Thanks ;)
You find the fixed version here.
https://www.dropbox.com/s/ux6u4jecpt05s ... .capx?dl=0

I altered the way how to update the current score.

You just forget to 'Set Item '...' to HighScore' to save it. Now it works.
Image Image iTunes: Match3 | Google Play: Match3
B
109
S
39
G
31
Posts: 1,175
Reputation: 29,314

Post » Thu Jul 30, 2015 6:00 pm

Thank you!
B
12
S
3
Posts: 129
Reputation: 1,131

Post » Thu Jul 30, 2015 6:13 pm

Okay, so i tested it and it worked fine. I got the score to 8,000 just to make sure it works. Then i copied the events into my game, and i tested it, the high score was going up fine as i played, but when the game was over, the high score went to 8,000. I went back to the one you made and i changed the score to 50. Then i tested my game again and the high score went to 50 when the game ended. So the high score was saving the project you made even though it was a whole another project. I even deleted the project and it still did the same thing. Do you know how to fix this? Sorry, i'm still a beginner. Thanks!
B
12
S
3
Posts: 129
Reputation: 1,131

Post » Thu Jul 30, 2015 6:26 pm

firezombie444 wrote:Okay, so i tested it and it worked fine. I got the score to 8,000 just to make sure it works. Then i copied the events into my game, and i tested it, the high score was going up fine as i played, but when the game was over, the high score went to 8,000. I went back to the one you made and i changed the score to 50. Then i tested my game again and the high score went to 50 when the game ended. So the high score was saving the project you made even though it was a whole another project. I even deleted the project and it still did the same thing. Do you know how to fix this? Sorry, i'm still a beginner. Thanks!


It's hard to say what the problem of your code is, whithout seeing your code.
I only can check it if you drop me a mail with your project file.

[email protected]

Regards
Andreas
Image Image iTunes: Match3 | Google Play: Match3
B
109
S
39
G
31
Posts: 1,175
Reputation: 29,314

Post » Fri Jul 31, 2015 5:51 pm

I just got it to work right, i changed the key and variable names and then it worked. Thanks for the help!
B
12
S
3
Posts: 129
Reputation: 1,131

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests