How do I use the Local Storage system?

Just started using Construct 2? Post your questions here

Post » Tue Jun 30, 2015 9:43 pm

Hello there!

I'm quite new here since I started making my game two days ago. I'm kind of stuck with the Local Storage thing, mainly because I don't quite understand the whole logic behing this yet. I'm trying to set a High Score system for my infinite runner game.
So if anybody could state how this works in easy, understandables words or if you've heard about a "Local Storage for Dummies" tutorial I would be more than happy :)
I would like to manage to do it by myself so no need for any step-by-step explanation, just explaining the logic behind this would be just great! :mrgreen:
Thank you!

MK
B
8
S
1
Posts: 16
Reputation: 602

Post » Tue Jun 30, 2015 9:45 pm

Sorry for my bad english, but I really do my best! And use and check with Google Translator.
B
11
S
4
G
1
Posts: 158
Reputation: 1,328

Post » Tue Jun 30, 2015 9:50 pm

Hey @deathangel1479, thanks for the tutorial :)
I've read this tutorial but still can't seem to fully get it since it doesnt work in my game. Guess I'll just try again with this tutorial, there's probably just something I'm missing :)
B
8
S
1
Posts: 16
Reputation: 602

Post » Tue Jun 30, 2015 9:54 pm

Did you read the added thread? (under the tutorial)
May be this helps more.
Or post your project, then we can see what you doing wrong.
Sorry for my bad english, but I really do my best! And use and check with Google Translator.
B
11
S
4
G
1
Posts: 158
Reputation: 1,328

Post » Tue Jun 30, 2015 10:32 pm

I did read the answers but I guess I'm too new tot his to fully understand the exemples/questions.
I can't post URLs yet :| I wanted to add a High Score system to complete the game a little more but maybe I should have waited and tried making simpler games at first, I don't know :)

Anyways, thank you for your replies!
B
8
S
1
Posts: 16
Reputation: 602

Post » Tue Jun 30, 2015 11:16 pm

You can post url`s like http ://www.google.com, and much other ways.
Do it any way you like. ;)
Sorry for my bad english, but I really do my best! And use and check with Google Translator.
B
11
S
4
G
1
Posts: 158
Reputation: 1,328

Post » Wed Jul 01, 2015 5:51 am

Have a look at my asteroids source in github - the page http://myconstruct2dev.blogspot.co.uk/2 ... roids.html decribes it.
My tutorial through development blog is at http://myconstruct2dev.blogspot.co.uk/
B
12
S
3
Posts: 221
Reputation: 1,328

Post » Wed Jul 01, 2015 9:08 am

Thank you @paulscottrobson, it seems much clearer now :)

@deathangel1479 the url to my project would be this one: dropbox.com/s/7v0qu5sh1ur0a2f/otto_legs.rar?dl=0

Thanks to both of you :)
I will try again with the explanations I got and tell you how it went :mrgreen:
B
8
S
1
Posts: 16
Reputation: 602

Post » Wed Jul 01, 2015 10:28 am

Ahh, yes.
Your misstake is in GameEventSheet.

On "EndGame"
---Timer > LocalStorage.ItemValue

Is anytime true, because you try to get a value, that not exist, so its 0.
There are some ways to make it nice, but I will show you first the best way to understand(same like Score Event Sheet):
Image

Fixed another little bug, you had "go to layout start", that was a problem. You dont die until your score was greater than highscore...
If you want to go to begin of current layout, try "restart layout".
Sorry for my bad english, but I really do my best! And use and check with Google Translator.
B
11
S
4
G
1
Posts: 158
Reputation: 1,328

Post » Thu Jul 02, 2015 6:38 pm

Oh thank you!
I'm going to work on that now, thanks for your help :)
B
8
S
1
Posts: 16
Reputation: 602


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests