Page 1 of 2

How do I get my save working

PostPosted: Fri Jan 15, 2016 10:43 am
by renesteeman
I'm trying to load a gamesave on the launch of the game and save after you died, but something's not working and I can't find the problem. This is the link for the project file /renesteeman.net/games/ArcadeMixV2/BUG/bug.capx

Thanks in advance!

Re: How do I get my save working

PostPosted: Fri Jan 15, 2016 11:13 am
by RBuster
Unfortunately you can't post links directly yet. Try to describe you code here.

Re: How do I get my save working

PostPosted: Fri Jan 15, 2016 11:22 am
by renesteeman
On start of layout load game from slot Save1

On is alive = 0 and score > highscore set highscore to score and save game to slot Save1

Something like that (the highscore works great, but when you restart the page it's set to 0 again)

Re: How do I get my save working

PostPosted: Fri Jan 15, 2016 11:24 am
by renesteeman
Oh, and how can I connect my construct 2 steam license to my scirra profile?

Re: How do I get my save working

PostPosted: Fri Jan 15, 2016 12:09 pm
by EdwardJT92
Quick question.

Your .cap file is full of a lot of things. Which layout in particular are you trying to save in? Or is it all of them?

Re: How do I get my save working

PostPosted: Fri Jan 15, 2016 12:33 pm
by renesteeman
All of them, the highscores in particular, the game layouts are less important

Re: How do I get my save working

PostPosted: Fri Jan 15, 2016 12:38 pm
by zenox98
renesteeman wrote:Oh, and how can I connect my construct 2 steam license to my scirra profile?


Email [email protected] and hopefully Scirra can organize that for you.

Re: How do I get my save working

PostPosted: Fri Jan 15, 2016 1:20 pm
by EdwardJT92
renesteeman wrote:All of them, the highscores in particular, the game layouts are less important


The best thing to do is make all the objects in your game have the "Behavior:No Save" (The easiest way for this to work is to add all the objects, text fields and anything else you may have to Families and give them all the No Save Behavior.) on them as the "System:Save" and "System:Load" options save and load all objects, variables and layout stances.

Let's take an example of my game:

This Screen-shot is taken from the event-sheet that will SAVE the state of the player at the end of the Layout he/she just finished:
Image

And this Screen-shot is taken from the "Main Screen" of my game. It shows that it "System:Load"'s from the game save data it has stored from the previous layout:
Image

If you need any help feel free to PM me directly or just reply to this thread and I'll see what I can do with your file. :)

Re: How do I get my save working

PostPosted: Fri Jan 15, 2016 9:37 pm
by renesteeman
Thanks for all the help, I found out that my game actually did save and load, but just not when you would close it and reopen it. So I still need to find out how I can do that, I'm thinking about local storage, but I can't really work with it (and I'm on build r220). Is it possible to make something like on save complete store data in local save HIGHSCORES?

I really like this community, you really try to help everybody as fast and best as possible!

Re: How do I get my save working

PostPosted: Sat Jan 16, 2016 8:22 pm
by renesteeman
I got a save system working, it looks like on press S local saves set item savehome to highscorespikes and the load part that looks like on press L get item savehome . I just can't figure out how to set the local stored highscore to the gamehighscore.

Could somebody please help?