Save - Load

Get help using Construct 2

Post » Fri Jul 11, 2014 8:51 am

Greetings,

i have made a game and exported for android, then made it apk with intel xdk. (with android option) but there is a problem, when i close the game, my progress vanishes. (i can go to menu without closing game and i can continue my progress when i touch start) i made "system - save" for every layout, and when the progress saved, after touch start in the menu layout, the system would load game where i left the game but it doesn't load and the game starts at episode 1 again. how can i make a perfect save-load system?
Last edited by Xenovia on Sun Jul 13, 2014 4:27 am, edited 1 time in total.
B
18
S
2
G
1
Posts: 67
Reputation: 1,339

Post » Fri Jul 11, 2014 9:34 am

Android stuff aside - does it work when you test it on PC?
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Fri Jul 11, 2014 10:21 am

no it doesnt
B
18
S
2
G
1
Posts: 67
Reputation: 1,339

Post » Fri Jul 11, 2014 11:10 am

Then you've probably got the save/load process down wrong. Can you post your capx?
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Fri Jul 11, 2014 11:12 am

i am new and i dont know so many things about construct 2

do i possibly have a problem with array or dictionary storages? i didn't insert them
B
18
S
2
G
1
Posts: 67
Reputation: 1,339

Post » Fri Jul 11, 2014 11:28 am

Here is my capx
You do not have the required permissions to view the files attached to this post.
B
18
S
2
G
1
Posts: 67
Reputation: 1,339

Post » Fri Jul 11, 2014 12:55 pm

Run your Menu in debug, and you'll see that the variable 'save' is already equal to 1, but the condition that loads your 'mysave' saved game requires that 'save<1' which it never is, so your saved game will never load.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,418
Reputation: 59,522

Post » Fri Jul 11, 2014 1:18 pm

But after finishing first level, system substracts 1 (as you see in event sheet 1) from save and "compare variable 'save<1' should work.
B
18
S
2
G
1
Posts: 67
Reputation: 1,339

Post » Fri Jul 11, 2014 1:46 pm

It doesn't matter what happens after the first layout.

If, as you say in your OP,

when i close the game, my progress vanishes


then obviously, it cannot reload your save game at the menu when you reload your game because the variable condition check will never be correct.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,418
Reputation: 59,522

Post » Fri Jul 11, 2014 1:49 pm

Hmm ,do you have an idea for what should i do?
Thanks in advance
B
18
S
2
G
1
Posts: 67
Reputation: 1,339


Return to How do I....?

Who is online

Users browsing this forum: gskunk, tarek2 and 42 guests