Cant go through a door but it shows on the map


I have a stubborn door. It has been working but has stopped recently. Here’s my source;

The small hole is north of the cave and south of the plateau. The small hole is a door. The small hole is undescribed. The description of the small hole is “Light, and heat, shines through the hole in to the cave. At some point it’s been widened and held open by thick old branches and other stones.”. The small hole is open and openable.

Instead of going through the small hole when the player does not enclose the rucksack and the player does not enclose the stick and the player does not enclose the bed roll and the player does not enclose the waterflask:
say “Looking through the hole you decide that, before you leave, you’d better take your stuff. You’re going to need it.”;

The small hole shows on the map and in the index as a door. The “Instead of” line works but once I meet the requirements and try to go north I’m told “You can’t go that way.”.

I know I’m being a burk but for the life of me I can’t see why it won’t let me travel once the requirements are met.


The reason your door isn’t working is the “can’t go through undescribed doors rule”. You can discover this by using the RULES testing command (while testing the game in the IDE). It tells you which rule is blocking your action.

You can eliminate it by making your door “scenery” instead of “undescribed” (Zarf tells us not to use “undescribed” anyway), or by cutting out the rule: “The can’t go through undescribed doors rule does nothing.”

By the way, do you know that the logic of your Instead rule means that the player only needs one of the four items to get through? If you want to force the player to take all of them, then you need to change your ANDs to ORs.

Edit: corrected typo.


Why are you using a door if it’s just a passageway?
Why is it open and openable (conversely meaning "closeable)? If you make it scenery as jrb suggested, the player can close it.

[code]Cave is a room.

Plateau is north of cave.

A small hole is in cave. It is fixed in place. The description is “Light and heat enter the cave through a small hole to the north.”

Instead of entering small hole: try going north.

Check going north when the location is cave:
if the player does not enclose every useful thing: [“enclose” because items might be in the rucksack]
say “You hesitate. You might not make it back here, so you ought to take your stuff.” instead;

A thing can be useful.
A rucksack is an openable, closed container in cave. It is useful.
A stick is in cave. It is useful.
A bedroll is in cave. It is useful.
A waterflask is in cave. It is useful.[/code]

A gentle reminder that if you have questions about Inform coding, they should go in the Inform 7 forum rather than General or Off-Topic. Also, moved the thread.

Thanks all

Hanon, really it’s just because I know no better. I didn’t know about passageways. I’ve been looking at the Room and Doors help pages, but neither mention that there might be another way to join two rooms. Might be good to have a reference perhaps. Even the “going from, going to” page only lists it as part of a description. Seems more suited to my needs though, thanks.

Your description also helps me answer question though, so double bonus :slight_smile:

Oh no worries, I didn’t mean to imply you were wrong, I just didn’t understand why you had an openable hole! :wink:

Doors are kind of weird to mess with. They’re great if you specifically want an opening and closing flap that can lock and unlock, and they have some other advantages.

Your “rooms” (which don’t need to be specifically a boxed-in space with walls, they’re more like “nodes” you can put stuff in, and simulate a room or areas of a lawn, whatever.) are considered continuous just by declaring them in spatial relation. “Grassy Meadow is north of Crossroads”. Putting doors everywhere is harder than doing that, which is why I was confused!

You could very well use a door how you intended:

[rant=code][code]“Plateau Escape”

Cave is a room. “The musty cave menaces all around. You hope there are no bats!”

a thing can be useful.

a stick, a rucksack, a bed roll, and a waterflask are useful things in cave.

Plateau is a room. “You are atop a flat stone that gives a great vista in every direction.”

a small hole is a door. “[if the location is cave]Light and heat shines through the hole into the cave. [otherwise]A small hole angles into the darkness of a cave. [end if]At some point it’s been widened and held open by thick old branches and other stones. It seems to lead [direction of small hole from the location].” It is unopenable and open.

[“unopenable and open” prevents any sort of hingey-doorey lockey-unlockey madness since caves usually don’t work that way]

small hole is north of Cave and south of Plateau. The description of small hole is “It leads [direction of small hole from the location].”

Check going to Plateau through small hole:
if plateau is unvisited:
if the player does not enclose every useful thing:
say “Looking through the hole, you decide that before you leave you might be wise to take [the list of useful things not enclosed by the player] as well.” instead;

Carry out going through small hole:
say “You hunker down and step gingerly into the small hole[if the player carries something], hoping all the stuff you are carrying fits through[end if]…”;

After going north through small hole:
say “You emerge in the blinding light on top of a plateau, giving you a stunning view of the desert.”

After going south through small hole:
say “Your eyes slowly readjust to the pitch blackness of the cave…”