Restore a Savegame into a Dialog

Started by SilverSpook, Mon 13/06/2016 08:42:03

Previous topic - Next topic

SilverSpook

Hi, I have a certain action sequence that starts out with a dialog. I want the game to autosave before starting that dialog.  Then, if the sequence isn't completed correctly, the game reloads and immediately restarts the dialog.

The problem is when I do a game slot restore, I can't figure out how to get the dialog to automatically be triggered.

Is there a way to start a dialog immediately after a restore state?

Slasher

#1
could you not do a boolean check when reloading after fade in and run dialog if false (incorrect)?

if correct set boolean to true.

Khris

You can use on_event and eEventRestoreGame: http://www.adventuregamestudio.co.uk/manual/ags42.htm

Before the dialog happens, set a bool to true (run_dialog_x_after restore). Then save the game, set the bool back to false and start the dialog.
In on_event / eEventRestoreGame, check for the bool being true, and if so, set it to false and start the dialog.
If the player failed the sequence, simply restore the game.

This is not tested but should work.

SMF spam blocked by CleanTalk