I am new to inform 7, and I want to undo an instead command that I only wanted to apply earlier. How do I do so? (I want this to happen after an event, using an after statement.)
How do I have an instead function apply for only a specified amount of turns?
93 Views Asked by Alan Zheng At
1
There are 1 best solutions below
Related Questions in INFORM7
- Inform 7 (10.1.2.20220830 on Windows 11) does not show story
- How Does One "Consult" a Book on a Random Topic in Interactive Fiction?
- Inform7 camera with two different film rolls
- Getting a simple reply from a character in Inform 7
- How to understand 's' only as abreviation for starboard, not south, in Inform7 interactive fiction?
- How to respond to "chuck wood" differently to "throw log"?
- How to change the definition of a command to refer to a different action
- Inform7 Can't Re-enter Containers
- Inform7 Ignoring Simple If-statements
- How do I end the story when score 100 reached? inform 7
- How do I get inside a room with locked door in inform 7?
- Prevent automatically entering the room on startup
- In Inform 7, what is the opposite of entering a container?
- Inform7: Can actions be made to default to the player if no noun is provided?
- Inform7: How do I make Inform7 display text only once when you enter a room but display every time you enter that room
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Suppose we have a little story with an instead-rule.
"Lasers" by Lynn The Lab is a room. "To the east lies the vault. If only there weren't deadly lasers separating you from it." The Vault is east from the Lab. "You made it!"Instead of going east from the Lab: say "A lattice of red-hot laser beams blocks your path."We'd like to "disable" this instead-rule once a certain action happens. This can happen from inside an after-rule, as you suggest, but also in any other kind of rule.
We could add something like this:
And now, instead of actually undoing our instead-rule definition at run-time, we narrow the condition of its definition down so that it is "defused", never to apply again, once
lasers safebecomes true.So we reprogram the instead-rule to read:
Instead of going east from the Lab when lasers safe is false: say "A lattice of red-hot laser beams blocks your path."Once nice thing about this pparoach is that we can now even "redo" our "undo": a simple
now lasers safe is falsereturns the instead-rule's old behavior.This solution is generic: you can always define a global truth-value that disables an instead-rule like this.
Of course, it is even easier to simply write some thing like:
Instead of [action] when the [noun] is (not) [adjective]:Instead of [action] when we have (not) [verb]ed the [noun]:In our case, we are free to write:
Instead of going east from the Lab when the dial is switched on: say "A lattice of red-hot laser beams blocks your path."or something like:
Instead of going east from the Lab when we have not pushed the red button: say "..."See §9.12. Actions as conditions.