| Chapter 12: Advanced Actions |

| 12.11. Check rules for actions by other people

If we want to impose the restriction about carrying the camera on everyone, we need a rule like the following:

> Check someone trying photographing: if the person asked does not carry the camera, stop the action.

Implicitly, that "someone" excludes the player. Note that we say nothing in this rule, stopping the action without a word: after all, Clark might well be out of sight when trying this. If he is within sight, then we read:

> >clark, photograph me
> Clark Gable is unable to do that.

We saw before that Inform's built-in rules all have handy names (the "can't drop what's already dropped rule", and such), and that these are useful when writing better "unable to..." messages. So for a deluxe version, we end up with:

> Check someone trying photographing (this is the other people can't photograph without the camera rule): if the person asked does not carry the camera, stop the action.

And now, with ACTIONS on, we find that:

> >clark, photograph me
> [asking Clark Gable to try photographing yourself]
> [(1) Clark Gable trying photographing yourself]
> [(1) Clark Gable trying photographing yourself - failed the other people can't photograph without the camera rule]
> Clark Gable is unable to do that.
> [asking Clark Gable to try photographing yourself - succeeded]

which means that we could have, say,

> Unsuccessful attempt by Clark trying photographing:
> if the reason the action failed is the other people can't photograph without the camera rule, say "Clark is too suave to be embarrassed. 'Frankly, my dear, I don't have a camera.'";
> otherwise say "Clark tries, and fails, to take a photograph."

169
| Example Get Axe Changing the check rules to try automatically leaving a container before attempting to take it. (And arranging things so that other people will do likewise.)

170
| Example Barter Barter Allowing characters other than the player to give objects to one another, accounting for the possibility that some items may not be desired by the intended recipients.

By default, if we make no modifications, telling one player to give something to another will fail, even if persuasion succeeds. This is because the default behavior of the GIVE command is interrupted by the "block giving rule" -- since in many cases we do not want people to exchange objects freely. However, suppose that we do want characters to be able to exchange articles freely: we allow persuasion to succeed and turn off the "block giving rule". "Barter Barter" The block giving rule is not listed in the check giving it to rules. A persuasion rule for asking people to try giving: persuasion succeeds. The Trading Post is a room. Meriwether Lewis is a man in the Trading Post. He carries a fluffy handmade quilt and a bag of beans. The beans are edible. William Clark is a man in the Trading Post. He carries leather slippers, a journal, and a loaf of bread. The bread is edible. The slippers are wearable. Instead of examining someone: say "[The noun] is carrying [the list of things carried by the noun]." And now we might want to implement a way to keep track of whether the recipient character wants what's being offered: Check someone trying giving something to someone (this is the sneering refusal rule): if the second noun dislikes the noun, stop the action. Unsuccessful attempt by someone trying doing something: if the reason the action failed is the sneering refusal rule, say "'Would you care for [the noun]?' [the person asked] asks solicitously of [the second noun]. But [the second noun] refuses [the noun] disdainfully."; otherwise say "[The person asked] just appears bewildered by this improbable instruction." Distaste relates one person to various things. The verb to dislike (he dislikes, they dislike, he disliked, it is disliked, he is disliking) implies the distaste relation. Clark dislikes the beans. Lewis dislikes the bread. Since we've defined this as a relation, we could change what the characters like and dislike during the course of the game, freely; for instance, characters might grow hungry and suddenly like all the edible articles. Test me with "x lewis / x clark / clark, give the slippers to lewis / clark, give the bread to lewis".

Previous | Contents | Next