Inform 7 Home Page / Documentation
"Asking ... to try ..." actions run through their Before and Instead rules like any other actions, but then (if no rule has intervened) something different happens: Inform has to decide whether the person asked consents to try the action or not. By default, the answer is always no, and text like the following will be printed:
> will, go west
Will has better things to do.
However, we can intervene to make the answer "yes", using a special kind of rule which produces a yes/no answer. The following examples show how we can give broad or narrow permission, as we choose:
Persuasion rule for asking people to try going: persuasion succeeds.
Persuasion rule for asking Will to try going west: persuasion succeeds.
Such a rule can either declare that "persuasion succeeds", or that "persuasion fails", or make no decision and leave it to another rule to say. If it decides that persuasion fails, it is also allowed to say something, describing why: in that event, the standard message ("Will has better things to do.") is suppressed. For example,
Persuasion rule for asking Will to try going:
say "Will looks put out, and mutters under his breath.";
The following rule, which is really only suitable for testing, makes everybody infinitely obliging:
Persuasion rule for asking people to try doing something: persuasion succeeds.
Supposing that Will does decide to cooperate, a new action is generated:
Will going west
and this is then subject to all of the usual action machinery. For instance, we could write a rule such as:
Instead of Will going west, say "He runs out into the waves, but soon returns, rueful."
So in this case the new action ("Will going west") failed: but the original action, "asking Will to try going west", is still deemed to have succeeded - after all, Will did try. To put it more formally, "asking X to try A" succeeds if the persuasion rules succeed, and otherwise fails.
Note also that "Instead of..." rules written for other people will be treated by Inform as failures, even if we write something like
Instead of Will pulling the cord:
say "The bell rings."
and thus may produce unsatisfactory results such as
>WILL, PULL CORD
The bell rings.
Will is unable to do that.
If we wish to write new successful actions for another character, we will need to create appropriate carry out and report rules for them: these will be explained in the sections to follow.
(Finally, note that the mechanism Inform uses to see if we have printed a refusal message of our own, in the event of persuasion rules failing, can be fooled if we write a persuasion rule explicitly ending with a "[paragraph break]" text substitution.)
|Start of Chapter 12: Advanced Actions|
|Back to §12.3. Giving instructions to other people|
|Onward to §12.5. Unsuccessful attempts|
The Hypnotist of Blois
We will learn more about check rules for other characters shortly, but the following prevents the hypnosis patient from trying to hypnotize us in turn:
Maison de la Magie is a room. "In a darkened room, a few hundreds of paces from the chateau of Blois, you give to tourists three shows a day: displaying to them power they do not comprehend and spectacles they do not deserve."
A volunteer is a woman in the Maison. "A volunteer from the audience stands facing you, [if alert]skeptically awaiting hypnosis[otherwise]her face worshipful and obedient[end if]." The printed name of the volunteer is "volunteer from the audience". The description is "A distracted, susceptible woman." The volunteer wears a t-shirt and a baseball hat.
Note that the policeman will never get to the second persuasion rule, so he will always refuse to do the player's nefarious bidding.
And here's an unnecessary aesthetic touch from a later chapter, which will round up the descriptions of your friends into a single paragraph:
Rule for writing a paragraph about someone who is not the policeman:
let X be the number of visible people who are not the policeman;
say "It's just [X in words] of you now: [a list of visible people who are not the policeman]. But it sure has been a rip-roaring evening."
Notice the difference between the two rules about disorderly conduct: the one for other people says 'the rule succeeds' to make sure that the action is counted as a success and not (as normally happens with instead rules) a failure. Most of the time we don't care whether actions are judged successes or failures, but it matters here, because if we type CHARLES, JUMP and the result fails, then text such as 'Charles is unable to.' will be printed - which would get in the way. So we declare the action a success.