Best Quick Way to Save Data using Array

Get help using Construct 2

Post » Fri Jul 20, 2012 11:12 am

Hi all, i would like to know when if i made an array which is set.

0 0 0 0
0 0 0 0

After of playing, array storage looks like:

0 2 2 1
1 2 1 2

Them, im going to click Save button which it's using Webstorage...Meanwhile, in editor, i wouldn't like to make more than 30 events to compare Array value in each actions.

What's best method to save array data by quick way? There a way to get "Index" expression?
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Fri Jul 20, 2012 12:19 pm

Webstorage: Set local key "savedArray" to Array.AsJSON

Array: Load from JSON string Webstorage.LocalValue("savedArray")
B
54
S
28
G
18
Posts: 1,520
Reputation: 24,990

Post » Sat Jul 21, 2012 1:20 am

[QUOTE=ramones] Webstorage: Set local key "savedArray" to Array.AsJSON

Array: Load from JSON string Webstorage.LocalValue("savedArray")[/QUOTE]

It works like a charm, thank you!
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638


Return to How do I....?

Who is online

Users browsing this forum: mercuryus and 14 guests