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
13
S
4
Posts: 105
Reputation: 1,503

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
13
S
4
Posts: 105
Reputation: 1,503

Post » Tue Aug 27, 2013 7:50 pm

@trance
I think what you want might be here?
B
45
S
15
G
73
Posts: 2,006
Reputation: 43,394

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
13
S
4
Posts: 105
Reputation: 1,503

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
284
S
109
G
91
Posts: 7,317
Reputation: 87,483

Post » Tue Aug 27, 2013 7:56 pm

B
45
S
15
G
73
Posts: 2,006
Reputation: 43,394


Return to How do I....?

Who is online

Users browsing this forum: wenwen11212016, Yahoo [Bot] and 7 guests