Inform Help: looking through a peep-hole

7 views
Skip to first unread message

roue

unread,
Oct 31, 1996, 3:00:00 AM10/31/96
to

Hi Folks,
I'm a new inform programmer and have been trying to implement a door
'peep-hole' with little success. I have it so that the peep-hole is the
child of the door, that's fine, and if you look at the peep hole you see
what's on the other side (though there is nothing on the other side and
the door is just an object, not really defined as a door in the game).
Unfortunately when I try "look through peep hole" or "look in peep hole" I
can't figure out how to let the program know. Running a before on look
doesn't make a difference and I can't find any reference in the inform
manual to "look through". Any suggestions would be greatly appreciated. At
this point I'm just floundering.


Matt Bockol
ro...@nothinbut.net


Andrew Plotkin

unread,
Oct 31, 1996, 3:00:00 AM10/31/96
to

roue (bo...@midway.uchicago.edu) wrote:
> I'm a new inform programmer and have been trying to implement a door
> 'peep-hole' with little success. I have it so that the peep-hole is the
> child of the door, that's fine, and if you look at the peep hole you see
> what's on the other side (though there is nothing on the other side and
> the door is just an object, not really defined as a door in the game).
> Unfortunately when I try "look through peep hole" or "look in peep hole" I
> can't figure out how to let the program know.

You cannot survive in Inform without reading the source code.

Specifically, look at the Grammar library file -- if your text editor
supports searching, search through for "look". This will show you exactly
what actions the "look" verb can map to.

"look in" and "look through" map to the Search action.

--Z

--

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the
borogoves..."

Steven Howard

unread,
Nov 1, 1996, 3:00:00 AM11/1/96
to

In <E05I3...@midway.uchicago.edu>, bo...@midway.uchicago.edu (roue) writes:
>Hi Folks,

Hi.

> I'm a new inform programmer and have been trying to implement a door
>'peep-hole' with little success. I have it so that the peep-hole is the
>child of the door, that's fine, and if you look at the peep hole you see
>what's on the other side (though there is nothing on the other side and
>the door is just an object, not really defined as a door in the game).
>Unfortunately when I try "look through peep hole" or "look in peep hole" I

>can't figure out how to let the program know. Running a before on look
>doesn't make a difference and I can't find any reference in the inform
>manual to "look through". Any suggestions would be greatly appreciated. At
>this point I'm just floundering.

"LOOK IN" and "LOOK THROUGH" actions are handled by the "SEARCH" verb.
At first glance, it doesn't make much sense for "LOOK IN WINDOW" to map
to "SEARCH WINDOW", but consider "LOOK IN SUITCASE" or "LOOK THROUGH
PAPERS".

========
Steven Howard
bl...@ibm.net

What's a nice word like "euphemism" doing in a sentence like this?

John Wood

unread,
Nov 1, 1996, 3:00:00 AM11/1/96
to

erky...@netcom.com (Andrew Plotkin) writes:
>
> You cannot survive in Inform without reading the source code.

Just in case it's not obvious to a newbie, that's the *library*
source code, not the *compiler* source code - i.e., the files
you include in your inf code (grammar.h, verblib.h and parser.h
in Inform 5.5, plus verblibm.h, parserm.h, linklv.h and
linklpa.h in 6.*).

As Andrew says, grammar.h is the first one to look at when you
want to find out how an action works by default, and also how
to avoid messing it up when you change it... ;-)

John


Torbj|rn Andersson

unread,
Nov 1, 1996, 3:00:00 AM11/1/96
to

bo...@midway.uchicago.edu (roue) wrote:

> I'm a new inform programmer and have been trying to implement a door
> 'peep-hole' with little success. I have it so that the peep-hole is the
> child of the door, that's fine, and if you look at the peep hole you see
> what's on the other side (though there is nothing on the other side and
> the door is just an object, not really defined as a door in the game).
> Unfortunately when I try "look through peep hole" or "look in peep hole" I
> can't figure out how to let the program know. Running a before on look
> doesn't make a difference and I can't find any reference in the inform
> manual to "look through". Any suggestions would be greatly appreciated. At
> this point I'm just floundering.

You should be able to trap both "look in peep hole" and "look through
peep hole" (as well as "look into peep hole" and "look inside peep
hole") using before on the Search action. (Though I admit I haven't
checked what the documentation says on the subject; I "cheated" by
looking at Grammar.h; I hope I got it right. :-)

If the Inform library hadn't already caught these actions, you would
have had to extend the grammar for "look", but that shouldn't have
been much of a problem.

I think the only think that remains to do after that is to make sure
the peephole is in scope, and since you said that looking at it works,
I guess you've already done that (transparent door? add_to_scope?).

_
Torbjorn

Reply all
Reply to author
Forward
0 new messages