webstorage - save settings

Get help using Construct 2

Post » Tue Aug 27, 2013 3:34 pm

Hello,
please guys tell me or show me some example (.capx) - How to save settings in your game using Webstorage?

Speaking about an Arkanoid game, in the "Options" section I would like to have 2 options:
1) play it with one finger (drag & drop)
2) play it with buttons along walls (left and right buttons)

I know how to do these 2 options and play it like that BUT I dont know how to persist selected option when I close my game. When I launch it again, default option (drag & drop) is set.

Could you please tell me how to set Webstorage?
B
14
S
4
Posts: 110
Reputation: 1,538

Post » Tue Aug 27, 2013 4:04 pm

I have made a simply example...

https://dl.dropboxusercontent.com/u/198256147/testX.capx

1) first choose one of the 2 options
2) then press start
3) then press F5 or close the windows and please fix it for me ! when I open it again I want play it with the last selected option.

So when I ended with drag and drop I want it to play again with this option when launch it again
trance2013-08-27 16:11:26
B
14
S
4
Posts: 110
Reputation: 1,538

Post » Tue Aug 27, 2013 7:50 pm

@trance
I think what you want might be here?
B
46
S
16
G
76
Posts: 2,150
Reputation: 45,313

Post » Tue Aug 27, 2013 7:54 pm

well I have already seen that tutorial but didnt find anything uselful. I tought that I have to focus completely on Webstorage.

I am really desperate... I have been trying to get this work all day...
B
14
S
4
Posts: 110
Reputation: 1,538

Post » Tue Aug 27, 2013 7:54 pm

Example capx.

But I strongly suggest you to check out more tutorials/elements from the "How do I FAQ" (for example, at the category "Webstorage" you would have found what you were looking for) before going further.

The mere fact that you are using several object types when you could be using simply instances suggest you might be still lacking in experience and could use some practice from the tutorials/how do I examples/manual articles.Kyatric2013-08-27 19:55:09
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
291
S
114
G
95
Posts: 7,290
Reputation: 70,138

Post » Tue Aug 27, 2013 7:56 pm

B
46
S
16
G
76
Posts: 2,150
Reputation: 45,313


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests