How do I check whether a save exist

Get help using Construct 2

Post » Wed Jul 05, 2017 4:42 pm

Saving using the System object is simple, and so is loading. Apart from saving and loading a separate Local Storage item "DoesSaveExist", is there a way of checking whether a save exists without actually trying to load it?
B
3
S
1
G
4
Posts: 14
Reputation: 1,253

Post » Wed Jul 05, 2017 5:09 pm

You can but you will have to use local storage. Have a global variable or an array dedicated to it, when you press the safe button set the variable to 1, and save it to local storage.

After that on star of layout load the variable from the local storage and once is loaded check its value if its 0 then there are no saved games if its 1 then there is a saved game.
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367

Post » Wed Jul 05, 2017 6:03 pm

Just rehashes of Local Storage solution, got it. Thanks.

It feels like the System object should have a capability to just check if a save slot is occupied. Loading and checking for success/fail is a little inadequate.
B
3
S
1
G
4
Posts: 14
Reputation: 1,253


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 12 guests