...remember a savestate after closing the app

Get help using Construct 2

Post » Thu Jan 30, 2014 7:23 pm

In my Android app I have created something which uses a saved variable to determine the output. The variable is determined by the user in the "settings" part of the app, and when created a savestate is made. Upon loading the homepage the app loads itself from that specific savestate. Then when they load a specific page it should display some text dependant on the variable. If I return to the main menu I can carry out this procedure as many times as I want without re-determining the variable, however if I close the app from the running apps list, then re-open it, the user will have to re-input the variable through the settings menu!

Kinda confusing I know but if you have any questions about it ask. Would really like to get to the bottom of this! It just doesn't seem to keep the savestate upon rebooting the app
B
4
S
1
Posts: 32
Reputation: 418

Post » Thu Jan 30, 2014 8:44 pm

Posting your project file may help.

Possible problems.
1. Make sure you are using local storage and not session.
2. Make sure you are not resaving or setting the value to default on any of your layouts.
B
26
S
8
G
2
Posts: 33
Reputation: 3,645

Post » Fri Jan 31, 2014 5:28 am

i'm definitely not resaving the session on any other layouts but how do I know if i'm using local or session? thanks
B
4
S
1
Posts: 32
Reputation: 418

Post » Sun Feb 02, 2014 4:11 pm

Ok so I was creating savestates by going system -> save then "save01"
and loading from system -> load "save01" but this wasn't working. I watched a guide on youtube about using JSON and he hadds a JSON object by double clicking the layout but my one has JSON missing from the list. I have tried saving the score variable by doing Set Local key "S1" to HighScore and loading by doing Load Game from JSON String "S1" but this just freezes my app!
B
4
S
1
Posts: 32
Reputation: 418

Post » Tue Feb 04, 2014 10:39 pm

Ok so I finally got it working using JSON saves. Not sure what the whole "System -> Save" and "System -> Load" is for but it seems temporary and I won't be using that again.
B
4
S
1
Posts: 32
Reputation: 418


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 22 guests