Locked Doors — 1 of 0

John Timmons

Release 1

"Locked Doors" by John Timmons

The release number is 1. The story creation year is 2007. The story headline is "Locked Doors". The story description is "Doors that can be locked and unlocked are pretty common elements in most buildings. This demonstrates creating a door that is locked and can be unlocked."

Release along with the source text and a website.

The Foyer is a room. "You can see a closet door to the east."

The Closet is a room. "The closet is empty."

[We create our door in the usual fashion. Then we say that is locked and is lockable. The last sentence tells Inform the object that can unlock (and lock) this door.]

The closet door is a door. It is east of the Foyer and west of the Closet. It is locked and lockable. The silver key unlocks the closet door. The description is "The closet door is [if closed] closed [otherwise] open."

[Here is the object that can unlock (and lock) the closet door.]

The silver key is carried by the player.

Test me with "open door / take key / unlock door with key / open door / e / w / close door / lock door with key".