How do I load the game after it closes?

Get help using Construct 2

Post » Thu Sep 22, 2016 11:03 am

Hey so i'm exporting NWJS, using C2's save/load feature. When I save the game, close it, and then reload the same .exe file and click load, there is no save? Is this supposed to happen??
- Head of Tall Story Studios.

Creator of GOV, Project Abyss, Spiritlands & more!
B
27
S
12
G
1
Posts: 129
Reputation: 3,064

Post » Thu Sep 22, 2016 11:08 am

Send your .capx or show your code please.
Hi I am Samuel :)

My google play
B
42
S
10
G
1
Posts: 126
Reputation: 3,278

Post » Thu Sep 22, 2016 12:52 pm

It's a game ready for Greenlight so i cannot do that. I just need to know if it's standard and how to fix. The capx wouldnt reveal anything.
- Head of Tall Story Studios.

Creator of GOV, Project Abyss, Spiritlands & more!
B
27
S
12
G
1
Posts: 129
Reputation: 3,064

Post » Thu Sep 22, 2016 2:50 pm

Friend. How will I help you without seeing what's happening in the code? I do not have a crystal ball. At least take a screenshot save and load code.
Hi I am Samuel :)

My google play
B
42
S
10
G
1
Posts: 126
Reputation: 3,278

Post » Thu Sep 22, 2016 4:35 pm

Image

I'm firstly wondering if with the NWJS export, if the .exe is ran and a save is made- if you run again if it should load?
There is nothing in the game set to delete saves, only override on a new game. :/
- Head of Tall Story Studios.

Creator of GOV, Project Abyss, Spiritlands & more!
B
27
S
12
G
1
Posts: 129
Reputation: 3,064

Post » Thu Sep 22, 2016 4:41 pm

Is "IsSaved" set only when the game is saved? If so you have to save once per game to be able to load?
B
233
S
62
G
33
Posts: 902
Reputation: 40,398

Post » Thu Sep 22, 2016 4:47 pm

Oh right I think i get what you're saying. So as the game reopens with IsSaved on default- 0, it doesnt let me load the game, but the save (hopefully) is still there. Yeh the IsSaved is when a save has happened. I wonder how to get passed it?
- Head of Tall Story Studios.

Creator of GOV, Project Abyss, Spiritlands & more!
B
27
S
12
G
1
Posts: 129
Reputation: 3,064

Post » Thu Sep 22, 2016 6:02 pm

Is there another way to detect a save?
- Head of Tall Story Studios.

Creator of GOV, Project Abyss, Spiritlands & more!
B
27
S
12
G
1
Posts: 129
Reputation: 3,064

Post » Thu Sep 22, 2016 6:16 pm

You could save the IsSaved value to Local Storage and reload it when the game loads.

Or you can just attempt to do the Load anyway and handle the missing save file (e.g. pop up message "No save found") in the On load failed trigger/condition

Load
Load the state of the game from a save slot. When done, triggers On load complete, or On load failed if the save slot has not been saved to before.
Find all the Construct 2 games that were on Steam Greenlight here
B
33
S
9
G
7
Posts: 451
Reputation: 6,782

Post » Thu Sep 22, 2016 9:28 pm

Fixed it! Did a simple variable removal for now but I will look into the IsSaved for local storage! This is just for Saturday's demo release.

Thank you all
- Head of Tall Story Studios.

Creator of GOV, Project Abyss, Spiritlands & more!
B
27
S
12
G
1
Posts: 129
Reputation: 3,064


Return to How do I....?

Who is online

Users browsing this forum: ASHKAR, brunopalermo, ItsAstro and 21 guests