Where is my failure? (webstorage, array)

Get help using Construct 2

Post » Sun Aug 24, 2014 5:44 pm

Hi,

can anyone tell me where my failure is?
i have seperate scores for each level and im saving them to an array, now i want to save them in webstorage too but im doing something wrong, it doesnt load the scores from the webstorage.
here are my events for that:
Image


Image

can anybody tell me how its done the wright way ?
B
38
S
11
G
5
Posts: 485
Reputation: 5,340

Post » Sun Aug 24, 2014 6:43 pm

Your code is too complecated for no reason. If you want a save/load system and you want to (for example) save the values in the array and then reload them on the next launch then you need to :
1) from webstorage : set local key --> key:"your key" value:<name of array object>.asjson
2)on start of layout : <array object> >load: "your key"

I Hope its simple to understand, ask me anytime for further instructions.
B
24
S
3
G
1
Posts: 67
Reputation: 2,946

Post » Sun Aug 24, 2014 6:52 pm

youre my hero :)
simple enough for me to understand and it does work nicely!
thank you very much!
B
38
S
11
G
5
Posts: 485
Reputation: 5,340


Return to How do I....?

Who is online

Users browsing this forum: engin20020, tarek2 and 20 guests