Lookie

I have been searching thru the docs for “look,” but can’t find what I want, which is to stand in one room and look into another.
What am I missing?

If you want things like “>LOOK NORTH” or “>LOOK THROUGH DOOR”, there’s a handy extension for that.

Does it work for looking into one room to another? I want the player to look into the open grave from the cemetery.

I thought I had an answer:

After deciding the scope of the player when the location is Cemetery: place Bottom of the Grave in scope.

I got that out of one of the examples in the docs, but it doesn’t appear to do anything.

That just lets the player refer to things that are in the other room. (So if the tire swing is in the Bottom of the Grave, the player will be able to “x tire swing” and it’ll work.) They won’t generally be able to do stuff to things in the other room, though.

If you want to print a description of what’s in another room in your room description, you’ll have to write a rule for describing what’s in the Bottom of the Grave when the player is in the Cemetery. (There’s an example in the Recipe Book included with Inform called “Dinner Is Served” I think that gives you some code for this.)

If you want the player to type a command “look into grave” and get the description of the Bottom of the Grave that’s more complicated–you’d have to create a new action for looking into rooms, and make sure it only worked when one room was visible from the other, and write a rule to govern its behavior. This could combine well with the deciding the scope rule (in fact the Dinner Is Served example uses a scope rule like this, IIRC), since if your looking action gives you “You can see a tire swing in the bottom of the grave” then you’ll want the player to be able to “x tire swing,” and the scope rule will let them do that.

ETA: Actually, the Facing extension that Draconis linked will define the “look at bottom of grave” action for you. You’d need to write some more complicated behavior than what it gives you, but if you want that, then you should definitely look into that extension.

It would probably make more sense to use only one room, and make the grave an open unopenable enterable scenery container in that room.

OK, thanks to both of you. Well, it’s late, and that code will have to wait till until da mornin’ come.

Happy to say, matt w’s suggestion worked. Thanks again.