check for save slot

Get help using Construct 2

Post » Mon Dec 01, 2014 9:40 pm

Using the built in Save system, is there a way to check to see if a save slot exists yet or not?
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021

Post » Mon Dec 01, 2014 10:25 pm

I'm not sure about this one.
You could do it manually using the condition "On save complete" and activating a variable. If you want to check if a save exists, then you could check this variable, if it's activated it means that the game has been saved.
B
75
S
29
G
17
Posts: 256
Reputation: 15,250

Post » Mon Dec 01, 2014 10:38 pm

@Xavier I don't think that would work because no variables would be set when the game is first started, even if they had been previously saved, because it's a fresh start.

What I'm trying to do it make it so that the Continue button on the title screen will only show up if there is save game data available to load.
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021

Post » Mon Dec 01, 2014 10:47 pm

I'm just doing the same thing. I'm planning to have another webstorage value indicating the last save (if there is one). You could have a webstorage value indicating if each save slot is empty or taken.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Mon Dec 01, 2014 10:52 pm

You can probably do it using webstorage for now. You don't need to save the whole game with webstorage, just store a value that tells you if there is a save or not.

Maybe Ashley could add a condition for the save/load system in future versions.
B
75
S
29
G
17
Posts: 256
Reputation: 15,250

Post » Mon Dec 01, 2014 11:06 pm

Yeah, I've used webstorage in the past for this and it worked well, but that was with nodewebkit (which I'm not developing for this time around). I guess I'll give it a shot here too since I can't think of any better methods. I was hoping there would be something built in by now since the save system utilized nameable save slots. Thank you.
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021


Return to How do I....?

Who is online

Users browsing this forum: t redeemed t and 5 guests