How do I get the value stored in localstorage?

Get help using Construct 2

Post » Wed Jul 29, 2015 11:19 am

Hi all,

I have stored a value in localstorage in the variable name "HighScore"

How do I get the value stored in localstorage?

Thank you all,

Best Regards,

Rajeshkannan MJ
B
9
S
2
Posts: 59
Reputation: 763

Post » Wed Jul 29, 2015 4:12 pm

The manual has instructions on how to use local storage.
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,116

Post » Wed Jul 29, 2015 4:14 pm

First, check if it exists, if it does, then retrieve it. If you look at my Asteroids source (see link) there's a working example.
My tutorial through development blog is at http://myconstruct2dev.blogspot.co.uk/
B
12
S
3
Posts: 221
Reputation: 1,328

Post » Wed Jul 29, 2015 6:16 pm

Message: vijayrajesh can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Yes, I learned it now,

The functions seems to be asynchronous and that made me little confusion to learn about. Now I understand how to use them,

Here is my events window. I have used 2 buttons, 1 input box and 2 text display boxes,

https://www.dropbox.com/s/pakf0he1t7pwnfg/BGXmp.jpg?dl=0
B
9
S
2
Posts: 59
Reputation: 763


Return to How do I....?

Who is online

Users browsing this forum: adventurist and 25 guests