12.12. Check rules for actions by other people

| Chapter 12: Advanced Actions |

| 12.12. Check rules for actions by other people

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

> Check someone 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 photographing yourself]
> [(1) Clark Gable 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 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."

206
| 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.) |
RB

We could now re-write the check rules so that any time someone (the player or someone else) tries to pick up a container which he is in, he will first get out: "GET AXE" This is the clever can't take what you're inside rule: if the person asked is in the noun, try the person asked exiting; if the person asked is in the noun, rule fails. The clever can't take what you're inside rule is listed instead of the can't take what you're inside rule in the check taking rules. Attic is a room. The unused coffin is in the Attic. The coffin is enterable and openable and open. Raskolnikov is a man in the coffin. Persuasion rule for asking Raskolnikov to try doing something: persuasion succeeds. Test me with "raskolnikov, get coffin".

207
| 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. |
RB

Previous | Contents | Next