Resetting To Earlier Game State On Death

Started by SilverSpook, Fri 14/08/2015 10:59:07

Previous topic - Next topic

SilverSpook

Hi guys, just trying to figure out how to reset the game back to a certain point when the character is killed, similar to what occurs in Gemini Rue when you get shot.  Is there a way to just save the state of the game before combat and then reload automatically that state when the player dies?

Mandle

I believe you just tell AGS to create a savegame file called Autosave or whatever just before the combat and then tell AGS to load Autosave if the player dies?

Not sure of exact syntax but I'm sure it's right there in the manual...although I would probably just take a look at the save/load game functions in the default game Global Script to find the keywords and then autofill it in my own script....I'm kinda lazy that way...

Crimson Wizard

You could use built-in AGS functionality, if it suits you.

Check SetRestartPoint and RestartGame.
These functions work with a special AGS save slot #999.

If you do not like that, it is not that hard to create your own autosave system, using SaveGameSlot and RestoreGameSlot.

Mandle

Quote from: Crimson Wizard on Fri 14/08/2015 11:13:18
You could use built-in AGS functionality, if it suits you.

Check SetRestartPoint and RestartGame.
These functions work with a special AGS save slot #999.

If you do not like that, it is not that hard to create your own autosave system, using SaveGameSlot and RestoreGameSlot.

Ahhhhhh much more useful than my reply and also I learned something awesome...I had no idea about SetRestartPoint...This will be very useful in my current project actually...

Cheers!

SilverSpook

Thanks guys for the quick and useful replies!

Mandle


SMF spam blocked by CleanTalk