If the player reaches an end that isn’t final and undoes their last command, what is the state of a condition like ‘if the story has ended’? Does the undo keep it false because the story technically hasn’t ended from the player’s perspective? Or does Inform keep track of things like that.
Can’t check this right now, and also not quite sure of the implications, so any context would be great. Thanks!
The UNDO command cancels the “story has ended” flag, same as it cancels all other changes that occured during the turn.
Thank you Andrew.
For other curious people: I made my own post of this because I didn’t have anything very specific in mind, but a little searching turned up this post, which has some handy ideas for playing with undo. The first extension it mentions is up to date with 6M62. the second one seems to be absent for an unknown reason, perhaps it’s merged.
I was able to retrieve the second extension (Conditional Undo by Jesse McGrew) from the Wayback Machine archive of the old Inform extensions website.
WARNING! This has only been explicitly updated to an older version of Inform, 6L02. I tested it a bit and it seems to work with the current version, but I can’t guarantee anything. Use with caution.
Conditional Undo.i7x (4.7 KB)
This was mentioned in the linked post, but for a direct link to the extension, Undo Output Control by Nathaniel Nerode has been updated to 6M62, if you want an extension to manipulate the undo capability.