Save game within editor

  • #1, by ygmantellMonday, 12. October 2015, 13:36 9 years ago
    If I run my game (within the editor) and save the game from the save menu that I made, am I supposed to be able to resume from where I saved last? Keep in mind that I did not make an output file yet, I am just running it within the editor.
    Thanks

    Also, Would conditions set last time the game was played carry over to next time it is played?
    I have a condition in the menu that is set when start is clicked.
    (you are not able to click continue unless you started and saved your game)
    Thanks

    Great Poster

    274 Posts


  • #2, by afrlmeMonday, 12. October 2015, 14:28 9 years ago
    Yes save games will work when running your game through the editor.

    Save game data contains all the relevant game data. Conditions, values, positions & so on & so on.

    However I do not recommend trying to load save games during development. Whenever you create something new in the editor (condition, value, character, scene object, whatever) you are essentially changing the xml data, thus if you try loading from an old save game file after updating your game with new content or having removed / replaced content, then it's possible that your game may load incorrectly (buggy) due to not containing all the relevant data in your save game files.

    For this matter, I recommend sticking to the autosave system during the development phase & deleting all your autosave files at game launch so that you start fresh each time you launch the game via the editor. You would remove those actions before compiling your finished game.

    Imperator

    7285 Posts

  • #3, by ygmantellMonday, 12. October 2015, 14:42 9 years ago
    Ok. I am only using the autosave action when save is clicked, and only having one continue button to load the autosave. So, there isn't multiple save slots. The problem is, when I run the game again, I cannot continue from where I saved last time. I only want to do this to test the function, but its not working.
    Thanks

    Great Poster

    274 Posts

  • #4, by afrlmeMonday, 12. October 2015, 15:01 9 years ago
    Why's it not running from where you last saved? What is it doing when you load a save?

    Imperator

    7285 Posts

  • #5, by ygmantellMonday, 12. October 2015, 15:46 9 years ago
    It works fine. But if I close the game window, then run the game again (without even making any changes) it wont work. I set up a simple condition so that I am not able to click the continue button (it is tinted grey until you save the game for the first time.) unless the game was saved. But when I run the game again, the button is still tinted grey, and it will not load any saves. I am able to start a new game, save, then load that save, but not if i close the game then run it again, which makes no sense if you are playing it out of the editor.
    Thanks

    Great Poster

    274 Posts

  • #6, by afrlmeMonday, 12. October 2015, 15:51 9 years ago
    That's because the game reads all the default data set in the ved on game launch. Why use a condition anyway? If you are using the autosave system then just add an if autosave #? exists > whatever actions you want it to do > end if.

    I don't actually know how you've setup your buttons mind, so what I just said above is how I sort it out myself.

    Imperator

    7285 Posts

  • #7, by ygmantellMonday, 12. October 2015, 15:57 9 years ago
    is there a "if autosave #? exists" action? I did not see one.

    Great Poster

    274 Posts

  • #8, by afrlmeMonday, 12. October 2015, 16:02 9 years ago
    Yes there's an if save exists. autosave is an option inside of that action. wink

    Imperator

    7285 Posts

  • #9, by ygmantellMonday, 12. October 2015, 19:08 9 years ago
    Ok, great. That worked, but now when I click new game (which I set to go to the starting scene) it continues from where I last saved.
    I want to be able to click new game, and it would start from the beginning and overwrite any other saves.
    Thanks

    Great Poster

    274 Posts

  • #10, by ygmantellMonday, 12. October 2015, 19:15 9 years ago
    Also, if this matters, I have a cutscene set up to start at the beginning of the game, which I also want to play, so that the game starts from the beginning.

    Great Poster

    274 Posts

  • #11, by afrlmeMonday, 12. October 2015, 20:17 9 years ago
    You need two autosave slots. One for new game & one for continue / resume game.

    You only need to create the autosave for the new game one time only which should be in the first non-menu scene & should only be created if the autosave does not already exist. My recommendation: get used to using if queries. wink

    Imperator

    7285 Posts