Please, help with a local storage/save problem I'm having...

Get help using Construct 2

Post » Sat Feb 13, 2016 9:42 pm

Hello all, I really need some help with a local storage (saving) problem I'm having at the moment. I'll pm the capx to you if you could help me out...

Thanks in advance!
Last edited by guannstar on Sun Feb 14, 2016 3:02 pm, edited 3 times in total.
B
27
S
5
G
1
Posts: 590
Reputation: 3,253

Post » Sat Feb 13, 2016 10:35 pm

Please all... I really need some help with this. I'm soo close, this is the last thing I need to figure out before finishing my app.
B
27
S
5
G
1
Posts: 590
Reputation: 3,253

Post » Sat Feb 13, 2016 11:02 pm

I *just* figured out the Local Storage stuff myself. (So I'm NOT the right guy to comment on someone else's .capx) But what is the general issue you're having?

I like to organize my code into groups that I can turn on and off as needed. This may not be helpful at all, but here's how I handled Local Storage:

Code: Select all
[START GROUP]
On start of layout:
     get item "player"
     get item "score"
     get item "sound"
     Set group "START GROUP" Deactivated
     Set group "GET VALUES" Activated

[GET VALUES]
On item "player" get
     System -> Set item global_player to localstorage.itemvalue
On item "score" get
     System -> Set item global_score to localstorage.itemvalue
On item "sound" get
     System -> Set item global_sound to localstorage.itemvalue
On All Gets Complete
     Set Group "GET VALUES" Deactivated

Good luck with your project!
B
11
S
3
Posts: 79
Reputation: 854

Post » Sat Feb 13, 2016 11:09 pm

Hey @JohnCutter... I was using the check instead of get item on start of layout. Is that wrong? I'll change it from check to get and see if it works.
B
27
S
5
G
1
Posts: 590
Reputation: 3,253

Post » Sat Feb 13, 2016 11:19 pm

No, it's still not working. Changing it from 'check' to 'get' did nothing. Guys... I really need some help with this problem. I've been at it for hours now (local storage is very new to me, I was using web storage before.... even after reading all the tuts, I still can't get my app to work... I really have no idea what to do at this point):(....
B
27
S
5
G
1
Posts: 590
Reputation: 3,253

Post » Sun Feb 14, 2016 12:18 am

Bump
B
27
S
5
G
1
Posts: 590
Reputation: 3,253

Post » Sun Feb 14, 2016 2:33 pm

BUMP...
B
27
S
5
G
1
Posts: 590
Reputation: 3,253

Post » Sun Feb 14, 2016 4:24 pm

Can someone please help me with this problem?
B
27
S
5
G
1
Posts: 590
Reputation: 3,253

Post » Sun Feb 14, 2016 5:05 pm

I can't find the original thread, but here's a basic example:
www.blackhornettechnologies.com/Constru ... ySave.capx
ImageImageImage
B
71
S
21
G
203
Posts: 3,583
Reputation: 115,070

Post » Tue Feb 16, 2016 11:43 pm

Can someone tell me what's wrong with this code (/why my Local Storage is not working)? My code is all at the top. Could that be the problem? Does the code have to be placed in a specific way?

Image
B
27
S
5
G
1
Posts: 590
Reputation: 3,253

Next

Return to How do I....?

Who is online

Users browsing this forum: 13spongg13, Kenthria and 8 guests