Webstorage (Save Game)

Show us your completed creations made in Construct 2

Post » Mon Mar 18, 2013 9:32 am

I have a doubt with this.

Im making a RPG game with larges arrays to Player info, Inventory, Objects info, etc. If I need save all the whole information with WebStorage, I need save data by data on separated keys?

Im download the .Capx example and I modify that to use arrays:

Example with array

If that works on this way, is a really boring and hard work.
Is some other way to save this type of data?
B
18
S
5
G
3
Posts: 158
Reputation: 4,813

Post » Mon Mar 18, 2013 10:52 am

[QUOTE=Kuso] I have a doubt with this.

Im making a RPG game with larges arrays to Player info, Inventory, Objects info, etc. If I need save all the whole information with WebStorage, I need save data by data on separated keys?

Im download the .Capx example and I modify that to use arrays:

Example with array

If that works on this way, is a really boring and hard work.
Is some other way to save this type of data?[/QUOTE]

To save an entire array to webstorage, use this simple method:


http://www.scirra.com/forum/saving-and-loading-an-array-to-webstorage-capx_topic50970_post353466.html#353466

http://www.scirra.com/forum/copy-an-entire-array_topic53153_post332888.html#332888Xavier2013-03-18 13:08:08
B
63
S
23
G
17
Posts: 254
Reputation: 14,342

Post » Mon Mar 18, 2013 12:50 pm

@Xavier Thank you SO MUCH!!!

I serached a lot of times, but I cant find that Thread.
So useful and... so simple! Im really impressed
B
18
S
5
G
3
Posts: 158
Reputation: 4,813

Post » Sat Mar 30, 2013 4:56 am

I got the following error while opening project

Banned User
B
32
S
5
G
5
Posts: 116
Reputation: 6,365

Post » Sat Mar 30, 2013 5:00 am

@tonycrew

I got the following error while opening the project

Banned User
B
32
S
5
G
5
Posts: 116
Reputation: 6,365

Post » Thu Apr 04, 2013 4:27 pm

I have been pushing everything to the dictionary so that I can use them as global variables then I just save the whole dictionary to webstorage. Is there any reason I should not do that and should use local variables instead?
B
6
S
3
G
1
Posts: 102
Reputation: 1,379

Post » Tue Aug 06, 2013 8:55 am

This saved my day.
Thank you!!
B
7
G
1
Posts: 28
Reputation: 591

Post » Thu Jan 30, 2014 1:54 pm

I read these post and think, wow to I have a lot to learn.

Thank you all for the information.
B
25
S
10
G
3
Posts: 154
Reputation: 2,838

Post » Wed Jun 04, 2014 1:53 am

Wow, i was looking for this post. and Thanx
Image
B
31
S
6
Posts: 197
Reputation: 2,447

Post » Wed Sep 17, 2014 12:30 pm

can't wait to go home and try it!
B
22
S
5
G
2
Posts: 209
Reputation: 3,359

PreviousNext

Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 6 guests