intfiction.org

The Interactive Fiction Community Forum
It is currently Thu Nov 23, 2017 10:43 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [I7]detecting an undo
PostPosted: Sat Sep 09, 2017 7:06 pm 
Offline

Joined: Sun Oct 11, 2015 5:09 pm
Posts: 276
I'm trying to figure out if there's a way to detect that the most recent command was UNDO. Like for instance:

Code:
Before reading a command when (the last command typed by the player was undo):
   say "Ah, well, nevermind then. Have another go:".


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Sep 09, 2017 7:12 pm 
Offline

Joined: Fri Oct 18, 2013 10:13 am
Posts: 2470
Location: The Midwest
The pure-I7 way to do this, hacky as it is, is to set a flag in the printing of the "[Previous turn undone.]" response and clear it after reading a command.

The less hacky way to do this involves I6 template replacements, adding a line to set the flag after a successful undo.

_________________
Daniel Stelzer


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Sep 09, 2017 8:54 pm 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 5117
Location: Burlington, VT
Does [url=https://github.com/i7/extensions/blob/master/Erik%20Temple/Undo%20Output%20Control.i7x]Undo Output Control by Erik Temple{/url] let you do what you want?


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot], litrouke, Yahoo [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group