So, again, for the sake of argument, not that I am planning to definitely do this in a real game, but let’s say I wanted to prevent Undo and Oops, forcing the player to live with the consequences of their actions. There are some extensions to help with this, but from what I understand there are interpreters that natively allow Undo? The only, very nasty, thing I can think of in that case would be to, using one of the mentioned extensions, trigger something that will crash the program… again, pretty nasty:
Before undoing an action:
while 1 > 0:
say "The world collapses in on itself...";
There’s no way to intercept a command with “undo” in it and reject it out of hand instead? Maybe with a nice message…
You can include Erik Temple’s Undo Output Control, along with Jesse McGrew’s Conditional Undo, available from inform7.com, to make custom versions of this. I would assume you could modify one of the functions in UOC just to reject OOPS* instead of printing a new message.
The code to change undo text would go something like
[code]“undo denied” by Andrew Schultz
include conditional undo by Jesse McGrew.
include undo output control by Erik Temple.
before undoing an action:
say “[one of]We’re sorry, sir, undo is not on the menu. Perhaps you would care to try going in a direction or manipulating an item instead?[or]Sir, we really must insist…[or]What’s that? You say you can’t go anywhere? We meant in real life, sir![stopping]”;
room 1 is a room.[/code]
I imagine oops is similar. Reading the extension documentation should help. (No, I haven’t. Yes, I should, myself.)