Re: Inform question ...


Sat, 10 Jun 1995 10:02:24 GMT

In article <3r7o3g$t84@PEAK.ORG>,
Even the losers get lucky <daye@PEAK.ORG> wrote:
>This is probably a very simple question, but for the life of me I've been
>unable to find the answer in the designers manual...
>
>I have a chair with a seatbelt. If the player is buckled in, he
>shouldn't be able to get out. I've tried checking this with a before
>statement as follows (I'm using the general property to determine if the
>belt is buckled or not...
>
>...
> before [;
> Exit, GetOff: if(self has general)
> "You are strapped in and can't get up!";
> rfalse;
> ],
>
>This may or may not be right...I'm new to this. If I play, I find the
>parser gets action 36 (the action command is dandy :) when I try to get
>off the chair, but even if the chair has general, it still lets me off.
>
>Am I trapping the wrong action? This is really frustrating....
>
It may not call the objects(chair) before routine. This is usually
the case with actions that require no noun. I think the parser will run
before routines if their is a noun present in the grammar. For EXIT there
is no noun, so no before routine runs.
Does GET OFF CHAIR work? That one does use a noun. Note that GET
OFF is the same as EXIT, only when you use a noun does it generate the
GetOff action.