Disable/enable exits?

Hi, I’m new with inform 7.

I’m trying to make a blocked exit from Room_A to Room_Elevator with no door. But I don’t know how. My idea is to have an elevator but you can’t enter that elevator without pressing a button in RoomA, a button that opens the exit to Room_Elevator. If someone can give an example, I would really appreciate it.

Would it work to have a door that won’t open unless you press the button?

[code]Room_A is a room. Room_Elevator is a room.

The elevator door is a door. The elevator door is closed. The elevator door is inside from Room_A and outside from Room_Elevator.

The up button is fixed in place in Room_A.

Instead of opening the elevator door:
say “You can’t just pry it open. You need to push the button to open it.”

Instead of pushing the up button:
say “The elevator door slides open. Now you can go in to the elevator.”;
now the elevator door is open.[/code]

(You could also set the door to “not openable,” but then you get an unhelpful default message when you try to open it.)

Thanks Matt w. I’ve been days wondering how to do it. :smiley:

You’re welcome!

You would also want to change the message for pushing the up button when the door is open. And if you want the elevator to change floors, well, that’s more complicated (you might want to look at the Dubai example in the documentation).