Checking if a "saved-game" is there

Get help using Construct 2

Post » Sat Jan 24, 2015 12:19 pm

Hey everybody,

is there a way to check if the user has used the "save game" function? I have a "continue"-button that only makes sense if there is something saved. ^^ I can't find the condition for it :-/

I know I could just build a value with webstorage but wanted to know if this is build-in or could be added in the future to be more elegant. :-)
B
34
S
9
G
3
Posts: 206
Reputation: 7,851

Post » Sat Jan 24, 2015 2:24 pm

I have found that using the Web storage works best for saved games so you can have code that can look for the saved game like so, I used this in my viral tap game on the Google play store and it works fine. Not sure if its what you want, but this allows you to only save what is needed rather than having overly bloated save files:
You do not have the required permissions to view the files attached to this post.
B
7
Posts: 61
Reputation: 417

Post » Sat Jan 24, 2015 3:36 pm

@RandomOutput Thx, for your input. I know the WebStorage Plugin well. I have been using that on all my games I did the last two years. Now I have a RPG game and it is quite complex to save all the monsters right. I am just lazy on that and the build-in save/load game works fine for that. At the end I will use arrays+webstorage again but I think checking for "savedgame exist" like the local storage for example has it might be a keen missing feature. :-)

I will just add a local key I will save if the user has/hasn't saved a game so I can grey out the "continiue"-button.

btw. This is the game I am talking about: battle-wizard-attack-google-play_t122403
B
34
S
9
G
3
Posts: 206
Reputation: 7,851

Post » Sat Jan 24, 2015 7:32 pm

Ahh I see, sorry I did not know it was for a complex game, I can see how that would be a chore! I think as far as I can tell that the save game feature can be accessed with the same web storage lookup but just put your save game name "My_Save" by default isn't it? I think I used that in a test and it loaded variables from the save file. I will test it again and let you know.
B
7
Posts: 61
Reputation: 417

Post » Sat Jan 24, 2015 7:33 pm

Oh cool work btw :)
B
7
Posts: 61
Reputation: 417

Post » Sun Jan 25, 2015 12:01 am

Image
B
16
S
7
Posts: 126
Reputation: 1,910


Return to How do I....?

Who is online

Users browsing this forum: Fradno, marcinkowski, tarek2 and 11 guests