Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: nemed on July 21, 2013, 02:57:23 PM

Title: Continue help plz
Post by: nemed on July 21, 2013, 02:57:23 PM
Hello I'm new and I'd like to know if it is possible to make a continue.
Let me explain:
A script that looks for the last backup and launches.

I Thank You in advance if you know if this is possible or not.
Title: Re: Continue help plz
Post by: piere on July 21, 2013, 10:37:39 PM
We can help you if you post in English  ;)
Title: Re: Continue help plz
Post by: metamorphium on July 22, 2013, 12:10:49 AM
I did continue method in J.U.L.I.A. and it's a bit tricky. However I risk that you don't understand me and my French is no longer usable. If you understand English, I'll post you how I did it...
Title: Re: Continue help plz
Post by: nemed on July 27, 2013, 12:51:21 PM
I do not mind the method in English
Title: Re: Continue help plz
Post by: nemed on August 04, 2013, 08:24:51 PM
It s possible to have method ?
Title: Re: Continue help plz
Post by: eborr on August 05, 2013, 12:22:14 PM
A couple of points

1. I have come up with a solution for this
2. It is really quite tricky and not something I would recommend to a beginner.
3.My approach doesn't use a new method which is Game.MostRecentSaveSlot() which is introduced in the latest beta, if I was writing the code now I would use this as it saves an awful lot of complex coding, fiddling about with filenames and modfiying the main game loops
4. What the code below doesn't do is to force the save when you quit, which is something you need to do if you are going to use a proper Quit/Continue routine - essentially you need to force a save as part of the quit routine
5 Without going into the exact code - what you need is something like this
Either create a new button on the main menu, or in some startup scene create an attribute
in the code which is fired by the button/object

have a line which says

Game.Load(Game.MostRecentSaveSlot());