webstorage

Get help using Construct 2

Post » Tue Jul 17, 2012 3:15 am

i have tried many time to fix this but i really couldn't find a way to fix that.
(capx)
https://dl.dropbox.com/u/90034817/scirra/levelSelect4.capx

the thing i want to happen is :
to save all array values and when i refresh the page the button should have the frame that fit the array value so if i played and got 1 star on level1 then i refresh the page it must have 1 star in that level and so on in all levels/worlds



.i have tried to save array value as keys but the problem that the buttons doesn't change always has frame = 0zsangerous2012-07-17 03:16:19
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Tue Jul 17, 2012 10:47 am

any idea that could help me?
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Tue Jul 17, 2012 7:58 pm

Simple, 2 lines -> levelSelect6.capx
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Tue Jul 17, 2012 8:07 pm

thanks @ramones you i really don't know what to say ^^ you are the best
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Tue Apr 23, 2013 5:40 pm

@ramones, I've tried your capx, but the problem is that it only unlocks up to level 10. Once I win level 10, level 11 remains unlocked. I've tried to add the width of the array, but doesnt work. Could you help me? thanks
B
41
S
9
G
4
Posts: 100
Reputation: 6,211

Post » Tue Apr 23, 2013 8:18 pm

@nothaseo You might have an array called 'levels' with width = 10 stored in local storage (if you set the width to 10 the first time you ran it or even something you saved in a different project).

It might be a good idea to set the size of the array to (12, 2, 1) after loading it. That would also be a good idea if you wanted to add more levels later while keeping your old saved values.

And also use a more descriptive name like 'mygamename_levels' because you could have many projects storing a value called 'levels' in local storage.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Wed Apr 24, 2013 1:00 pm

Thanks @ramones, I did you suggestion n found out that the problem's in the name "levels". I remembered that previously I worked on another game project with "levels" in local storage. Thanks
B
41
S
9
G
4
Posts: 100
Reputation: 6,211

Post » Tue Jul 29, 2014 10:20 pm

@ramones

Hi friends, i need some help plz,
I'm doing a game with 3+ world ,but setting the array 12,2,1 doesn't work (it only unlock till the second world!)
Any suggestions plz???
Really tnks to all that could give some help.......!

(sorry for my poor English!)

:|
B
7
Posts: 3
Reputation: 297

Post » Wed Aug 13, 2014 7:17 pm

Not to bump an old thread - but this was great - thank you.
B
4
Posts: 1
Reputation: 202

Post » Fri Aug 22, 2014 12:41 am

ramones wrote:@nothaseo You might have an array called 'levels' with width = 10 stored in local storage (if you set the width to 10 the first time you ran it or even something you saved in a different project).

It might be a good idea to set the size of the array to (12, 2, 1) after loading it. That would also be a good idea if you wanted to add more levels later while keeping your old saved values.

And also use a more descriptive name like 'mygamename_levels' because you could have many projects storing a value called 'levels' in local storage.


i can't thank you enough!!!!!

THanks]
Thanks again
Banned User
B
7
S
1
Posts: 57
Reputation: 555

Next

Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Artpunk, Magistross and 33 guests