Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

I7: How to make a mirror object in-game

0 views
Skip to first unread message

Raksab

unread,
May 12, 2008, 3:02:20 AM5/12/08
to
Apologies if this question has been asked and answered: I searched the
newsgroup and was unable to find an answer.

I just upgraded to the newest version of I7 (I love the new recipe
book, but the software seems a lot pickier about placement of nouns
than it used to be!) and one thing I couldn't find in it was an
example of a reflective object. I would like to create a mirror that
the player can LOOK IN and get images reflected.

Problem I'm running into at the moment is: whenever I LOOK IN
something, no matter what other text I order I7 to show, it always
says "You find nothing of interest." Even if the object I'm trying to
look in has not been designated as a container!

For example, I tried:
>> The mirror is a thing in Lobby. The description of the mirror is "It[apostrophe]s just the same polished sheet of metal that[apostrophe]s always been here." Instead of looking in the mirror, say "You see the lobby reflected in the mirror."

This compiles okay, but when I LOOK IN MIRROR, I get "You find nothing
of interest."

I also tried substituting:
>> Before looking in the mirror, say "You see the lobby reflected in the mirror. "; stop the action.

This gives the same result: nothing of interest.

I can implement a new verb: a "gaze" verb for example, but I'd rather
not do that since I think most players will find it more intuitive to
"look in" the mirror instead.

I'm not going to get too ambitious, but I suppose that other players
would like to create mirrors (or other shiny reflective objects) that
they can gaze into and get variable responses depending on what
they're wearing or how the room looks at the moment.

Can someone help me by suggesting some code to use? Thank you for
your help!

Eric Eve

unread,
May 12, 2008, 3:22:08 AM5/12/08
to
"Raksab" <thel...@hotmail.com> wrote in message
news:184dc703-5e6a-4fa1...@p39g2000prm.googlegroups.com...

> Problem I'm running into at the moment is: whenever I LOOK IN
> something, no matter what other text I order I7 to show, it always
> says "You find nothing of interest." Even if the object I'm
> trying to
> look in has not been designated as a container!
>
> For example, I tried:
>>> The mirror is a thing in Lobby. The description of the mirror
>>> is "It[apostrophe]s just the same polished sheet of metal
>>> that[apostrophe]s always been here." Instead of looking in the
>>> mirror, say "You see the lobby reflected in the mirror."
>
> This compiles okay, but when I LOOK IN MIRROR, I get "You find
> nothing
> of interest."
>
> I also tried substituting:
>>> Before looking in the mirror, say "You see the lobby reflected
>>> in the mirror. "; stop the action.
>
> This gives the same result: nothing of interest.

The action corresponding to LOOK IN is searching, not looking in.
Presumably I7 understands:

Instead of looking in the mirror, say "You see the lobby reflected
in the mirror."

As meaning "Instead of looking when the player is in the mirror",
which compiles, but is a condition that's never met, since the
mirror isn't enterable. What you want is:

Instead of searching the mirror, say "You see the lobby reflected in
the mirror."

-- Eric


S. John Ross

unread,
May 12, 2008, 3:21:57 AM5/12/08
to

> Problem I'm running into at the moment is: whenever I LOOK IN
> something, no matter what other text I order I7 to show, it always
> says "You find nothing of interest." Even if the object I'm trying to
> look in has not been designated as a container!

By default, "Look in" is tied to the SEARCH action ... (ditto for
"Look through" and "Look inside" and "Look into"), which is normally
meant only for searching the contents of containers and supporters.
You can read more about "Search" in the actions portion of the index
(after compiling a game).


> >> The mirror is a thing in Lobby. The description of the mirror is "It[apostrophe]s just the same polished sheet of metal that[apostrophe]s always been here." Instead of looking in the mirror, say "You see the lobby reflected in the mirror."

Just change "Instead of looking in ..." to "instead of sarching ..."
like so:

===

The Lobby is a room.

The mirror is a thing in Lobby. The description of the mirror is
"It[apostrophe]s just the same polished sheet of metal

that[apostrophe]s always been here." Instead of searching the mirror,


say "You see the lobby reflected in the mirror."


Someone who knows more about I7 will be along to help soon, most
likely, but that should get you pointed in the right direction.

S. John Ross

unread,
May 12, 2008, 3:22:44 AM5/12/08
to

> Someone who knows more about I7 will be along to help soon [...]

And, come to that, someone who types faster than I do ;)

Al

unread,
May 12, 2008, 8:29:30 AM5/12/08
to
On May 12, 1:22 am, "S. John Ross" <sj...@io.com> wrote:
> > Someone who knows more about I7 will be along to help soon [...]
>
> And, come to that, someone who types faster than I do ;)


You COULD do it this way if you so desired but then doing any search
routines
you'd have to tell the game
"instead of searching [something] try looking in [the noun]".

(see last paragraph below)

understand the command "look" as something new.
looking in is an action applying to one thing.
understand "look in [something]" as looking in.

Instead of looking in the mirror,
say "You see the lobby reflected in the mirror."

understand the command "look" as something new.
looking in is an action applying to one thing.
understand "look in [something]" as looking in.

Instead of looking in the mirror,
say "You see the lobby reflected in the mirror."

instead of searching the mirror,
try looking in the mirror.

Eric Eve

unread,
May 12, 2008, 9:15:02 AM5/12/08
to
"Al" <radi...@evcohs.com> wrote in message
news:e56ad0e5-f549-409e...@i76g2000hsf.googlegroups.com...

On May 12, 1:22 am, "S. John Ross" <sj...@io.com> wrote:
> > Someone who knows more about I7 will be along to help soon [...]
>
> And, come to that, someone who types faster than I do ;)


> You COULD do it this way if you so desired but then doing any
> search
> routines
> you'd have to tell the game
> "instead of searching [something] try looking in [the noun]".

I don't understand this at all. At present the grammar "look in
[something]" triggers the searching action. Why do you need to
redirect the searching action to anything else to achieve the effect
the OP wants? And if you did the statement required would be:

instead of searching something: try looking in the noun.

But I wouldn't recommend trying that (see below).

> (see last paragraph below)

> understand the command "look" as something new.
> looking in is an action applying to one thing.
> understand "look in [something]" as looking in.

I think it would be dangerous to define an action called "looking
in", since this would probably confuse the I7 compiler. At present
the compiler would understand: "Instead of looking in the Hall" as
meaning "Instead of looking when the player is in the Hall".

> Instead of looking in the mirror,
> say "You see the lobby reflected in the mirror."

All you need is:

Instead of searching the mirror,


say "You see the lobby reflected in the mirror."

Are you trying to avoid "search mirror" and "look in mirror"
triggering the same action? The OP didn't ask for that, but if that
is a concern I think you'd need to do it differently. And if you do
use "understand the command "look" as something new" you'd have to
remember to reinstitute several existing understand lines (for the
look and look under commands).

-- Eric


Emily Short

unread,
May 12, 2008, 11:10:40 AM5/12/08
to
On May 12, 3:02 am, Raksab <theli...@hotmail.com> wrote:
> Apologies if this question has been asked and answered: I searched the
> newsgroup and was unable to find an answer.
>
> I just upgraded to the newest version of I7 (I love the new recipe
> book, but the software seems a lot pickier about placement of nouns
> than it used to be!) and one thing I couldn't find in it was an
> example of a reflective object.  

That would not be terribly difficult to add. Where would you have
looked for it in the Recipe Book? Under Furniture, maybe?

> Can someone help me by suggesting some code to use?  Thank you for
> your help!

The specific problem has already been addressed, but I wanted to add a
general note: if you cannot figure out what Inform is doing in
response to a given command, the fastest solution is to type

ACTIONS

and then the command you're curious about, such as

LOOK IN MIRROR.

You will then get debugging information listing any actions that
Inform is performing in response to your command. In this case, that
looks like

>look in the mirror
[searching the mirror]


You find nothing of interest.

[searching the mirror - failed the can't search unless container or
supporter rule]

Raksab

unread,
May 12, 2008, 2:28:56 PM5/12/08
to


Thanks to everyone who helped with this! I forgot about "searching"!
I have used ACTIONS before (it is very handy for figuring out why the
game is up to something) but I didn't think to apply it to this
problem. I will have to remember to use ACTIONS more often in the
future -- it is a neat feature.

Yes, 'furniture' is exactly where I looked in the recipe book hoping
for a mirror. I thought it might be in the list of bathroom
furnishings in sample #412, "Modern Conveniences," but it wasn't. You
could definitely put a basic mirror under Furniture or Props (ch. 9),
because a mirror is normally furniture but some of them can be picked
up and carried (making them props). In this case, all I wanted was a
static piece of furniture.

If you're going to make an example for a dynamic mirror (one that can
be aimed, or can show different images depending on what else is in
the room, etc.), that probably should be in the recipe book under
"physics," because reflecting images is a weird and complicated
property. Still pools of water, shiny objects, and metal surfaces can
also be reflective, of course.

Heh heh heh... speaking of mirrors, I remember a certain puzzle in
"Beyond Zork" that nearly drove me nuts.

S. John Ross

unread,
May 12, 2008, 2:41:11 PM5/12/08
to

> Heh heh heh... speaking of mirrors, I remember a certain puzzle in
> "Beyond Zork" that nearly drove me nuts.

My only complaint with that puzzle is that it had the side-effect of
putting Tim Curry in my mind as the Ur-Grue ...

Emily Short

unread,
May 12, 2008, 2:46:52 PM5/12/08
to
On May 12, 2:28 pm, Raksab <theli...@hotmail.com> wrote:
> If you're going to make an example for a dynamic mirror (one that can
> be aimed, or can show different images depending on what else is in
> the room, etc.), that probably should be in the recipe book under
> "physics," because reflecting images is a weird and complicated
> property.  Still pools of water, shiny objects, and metal surfaces can
> also be reflective, of course.

Well, yeah, but your average IF game isn't going to deal with the
kinds of things that make this so complicated -- it's hard even to
describe things like angle of incidence in text.

Anyway, I've drafted up something (very simple) and added it under
Kitchens and Bathrooms, but with links from furniture, clothing, and
the looking in/under commands, since I figure those are the occasions
when people are most likely to need it.

0 new messages