Inform 7 Home Page / Documentation
§18.15. Issuing the response text of something
1. When it happens. When Inform prints a text marked with a response letter (A), (B), (C), ..., in a rule making use of them. For example, in this rule:
Carry out taking inventory (this is the print empty inventory rule):
if the first thing held by the player is nothing,
say "[We] [are] carrying nothing." (A) instead.
Or, less directly,
let R be the print empty inventory rule response (A);
say "To be frank: [text of R].";
2. The default behaviour. To print the current textual value of the response, making any substitutions in the ordinary way.
3. Examples. This activity is not the best way to amend responses or make them dynamic; the whole idea of responses is that they can be changed just as if they were text variables. This activity should be used only if it's important to amend blocks of responses in some systematic way.
(a) With that said, some interesting effects can be achieved. This is a way to see which responses are being printed, for example:
Before issuing the response text of a response (called R): say "[R]: ".
whence:
>WAIT
standard report waiting rule response (A): Time passes.
(b) And this intercepts the activity in order to re-run it in each of the six viewpoints. (Note the way a variable is used to prevent the rule from applying to all of those re-runs as well.)
Rule for issuing the response text of a response (called R) when the response inhibition is false:
now the response inhibition is true;
let the current viewpoint be the story viewpoint;
repeat with P running through narrative viewpoints:
now the story viewpoint is P;
say "[P]: [text of R][command clarification break]";
now the story viewpoint is the current viewpoint;
now the response inhibition is false.
With that in place,
>EAST
first person singular: I can't go that way.
second person singular: You can't go that way.
third person singular: He can't go that way.
first person plural: We can't go that way.
second person plural: You can't go that way.
third person plural: They can't go that way.