Checking if save data exists

Get help using Construct 2

Post » Sat Sep 03, 2016 9:47 pm

With the native saving and loading in Construct 2, is there a way I can check if savedata exists as a condition trigger? On save complete might work, but I'm looking for a possible string/code snippet or whatever that basically says or checks for "does slot1's savedata exist?" (i.e, it's not an empty slot and didn't have anything saved to it beforehand)
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 534
Reputation: 19,620

Post » Sun Sep 04, 2016 12:17 am

If it's empty then 'load' would fail and you can trigger 'on load failed', is that what you're after?
B
46
S
16
G
76
Posts: 2,150
Reputation: 45,313

Post » Sun Sep 04, 2016 3:04 am

I suppose, maybe.

At the moment, I made the realization I could just use a global variable or array (the latter since I'm switching to a partly array-based system for the gamekit's data), and have that changed to a value right after savedata is saved for the first time. On loading the game back up, just check the variable accordingly to decide whether to load a new playthrough or display the filename and load if it interacted with.
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 534
Reputation: 19,620


Return to How do I....?

Who is online

Users browsing this forum: ASHKAR, brunopalermo and 22 guests