Inititate a SAVE/RESTORE from an action

Obviously if you type ‘SAVE’/‘RESTORE’ you can open a dialog box and save/load a game file.

However, is there a way to ignite that process from within an Instead?
For example:

    Instead of retreating:
	say "Before you retreat, I advise you save!";
	pause the game;
	try saving;  

Try Saving doesn’t work, that’s just an example of the effect i’m trying to achieve.

The saving action is listed in the Standard Rules as “saving the game.” So try saving the game should work.

However, consider that the player might have already saved the game just before and would have to dismiss the save dialog box before moving on. Also, the dialog box might cover up the game prompt (with its message explaining the save box), so the player might be confused by the box popping up for no apparent reason. You could also address these issues with something like:

Before retreating:
	say "Would you like to save the game first?";
	if the player consents:
		try saving the game.

Thanks FriendfFred, ‘try saving the game’ was the correct syntax I was looking for.

Also, in regards to player’s saving before hand, covering game prompt etc.
It’s actually part of a menu driven choice system so ‘save’ is a deliberate request.
I just needed to interpret a different command to save, as opposed to the manual method.

Just an FYI to anyone who may be reading this: There are two easy ways to find out the names of actions. They are listed in the under the actions section of the “Index” tab of the IDE. Also, we can turn rules tracing on in the “Story” tab by typing “actions” at the command prompt. It still opens the dialog box in this case, but otherwise, will look like this:

Actions listing on.

[saving the game]
Save failed.
[saving the game - succeeded]

(Note that it reports the rule succeeding even though the action failed. Basically, it succeeded in trying to save the game and not doing so.)


If this seems confusing (and it does!) for an action to succeed it needs to clear the Before, Instead and Check stages to reach the Carry out stage. Regardless of what actually happens in these preceding stages, or in the Carry out and subsequent stages, the action is said to have failed if it doesn’t reach the ‘Carry out’ stage and to have succeeded if it does.

1 Like