I would like to have the player operate an escalator

I would like to setup a simple scene. The player is on the first floor and there is an escalator that is moving up. So the player can go east or up to the second floor. After the player goes up, the player can NOT go west or down unless he/she pushes the button for the escalator to go down. Then the same motion is possible when the player is on the first floor. ie. The player can NOT go east or up unless the escalator is reversed again.

I’m following the http://www.sibylmoon.com/welcome-to-adventure/ tutorial and I finished Lesson 1. So setting up movement between rooms is simple, but before I try to figure out lesson 2, I thought someone can make a simple example about this.

So far, I have this:

"Learning" by electricstring

There is a room called 1st Floor. "This is a large room with an escalator."

A room called Escalator is east of 1st Floor. A room called Escalator is up of 1st Floor.

A room called 2nd Floor is east of Escalator. "This is the upper floor of the building. There is an escalator here."
Down from 2nd Floor is nowhere. West from 2nd Floor is nowhere.

I’m a beginner with Inform 7.

Thank you!

The reverse switch is a device in the 2nd Floor.

Instead of going to the Escalator from the 1st Floor when the reverse switch is switched on:
    say "You try to run up the escalator, but it is moving too quickly downward."

Instead of going to the Escalator from the 2st Floor when the reverse switch is switched off:
    say "You try to run down the escalator, but it is moving too quickly upward."

I would also recommend making the escalator a “door” rather than a “room” in and of itself, but that’s a design decision.

Draconis as always has the easiest way. My suggestion: make the escalator a backdrop in both rooms. Make “moving steps” an enterable supporter and part of the escalator backdrop. Use an instead rule to redirect entering the escalator to entering moving steps. Use understand to make “stairs” synonymous with moving steps. (Mention the escalator in both room descriptions. )

Make a fixed in place button that is pushable. Make a truth state called “esc_up” that is true. Make a carry out rule that toggles the truth state when the button is pushed.

Write an “after entering moving steps” rule that moves the player to the correct room after they enter (get on) the moving steps based on the truth state controlled by the button.

In each appropriate room, redirect directions as appropriate to “entering the moving steps”.
“Instead of going west or going up when the location is lower level, try entering moving stairs”.

Write the description of the escalator and stairs so it also changes based on the directional truth state.

I have nothing to add (Draconis did this the way I would have suggested) except that I’m very happy the tutorial has been of use to you.