Er, sorry, I mistyped. The reaching outside rules is in fact what I meant. This is what the code sample should have looked like:
Rule for reaching outside the wobbly stool:
if the ___________ is the light bulb:
allow access;
otherwise:
say "You'll have to get down from the stool first.";
deny access.
Here’s a complete working example of what I’m trying to do:
[code]The Garage is a room. “The light bulb in the ceiling is burned out again, and all you have to stand on is that wretched stool. One day you’re going to break your neck on that thing.”
A light bulb is here. It is scenery.
The wobbly stool is here. It is a scenery, enterable supporter.
Instead of doing something when the current action involves the light bulb and the player is not on the wobbly stool:
say “You can’t reach the light bulb from here.”
A dental floss is here. The indefinite article is “some”.
Instead of tying the dental floss to something:
say “You loop the dental floss around [the second noun] and knot it tight.”;
now the dental floss is part of the second noun.
Rule for reaching outside the wobbly stool:
if the noun is the light bulb:
allow access;
otherwise:
say “You’ll have to get down off the wobbly stool first.”;
deny access.
Test me with “touch bulb / get on stool / touch bulb / get floss / get off stool / get floss / get on stool / tie floss to bulb”.[/code]
You can see the problem at move 8. The action fails because the light bulb is the second noun, not the noun.
I was hoping that there was some variable that stored what, exactly, the game is trying to reach each time the reaching rules are invoked. I suppose I can do something like this:
[code]if the current action involves something that is not stool-accessible, deny access.
Definition: a thing is stool-accessible if the wobbly stool does not enclose it and it is not the light bulb.[/code]
Too bad it’s so ugly and awkward.