So I figure the way to do that is to make the window lockable/locked,
and make a screwdriver the key. But in play, the window shouldn't be
described as locked, just stuck. When the player tries to "open
window," it should say that it's painted shut, not locked. When the
player types "open window with screwdriver," it should simultaneously
unlock and open the window, while saying something about falling paint
chips instead of that the window is unlocked. (Also, I need to change
the window to not lockable, so it doesn't have to be pried open every
So, I guess what I need to do is intercept the "open" command, have it
unlock and then open (without causing an infinite loop) and at the
same time changing the default text in all locked/unlocked/with key/
without key situations. This is making my brain swell slightly, which
among other things makes me start every paragraph with "so."
So, any advice would be appreciated.
Emil, the Poorly Informed
How about something like this:
The Stuffy Apartment is a room.
the window is a door. It is west of Stuffy and east of the Herb
Garden. The window is closed and locked. The screwdriver unlocks the
window. The player carries the screwdriver.
Instead of opening the locked window:
say "It seems to be painted shut."
Instead of unlocking the unlocked window with something:
say "You have adequately freed the window."
Instead of locking the locked window with something:
say "That doesn't seem to be something you can lock." [Because we
don't want the player trying LOCK WINDOW and having it be treated like
a sensible action.]
Carry out unlocking the window with something:
now the window is not lockable;
now the window is open.
Report unlocking the window with the screwdriver:
say "You get to work with the screwdriver, causing a rain of paint
chips. Once it's free, you open the window." instead.
Understand "jimmy [something] with [something]" as unlocking it with.
Understand the commands "pry" and "lever" as "jimmy".
Test me with "open window / lock window / open window with
screwdriver / g / lock window / pry window".
> the window is a door.
It's lines like that which make me love Inform 7. It brought to mind
the I7 poetry thread from a while back (or did I dream that?) Anyway,
it inspired me to come up with the following, possibly my greatest
work of interactive fiction to date: -
"The Lady in the Lake" by Jerome West
The apple is a room.
"A winding street in Rome
with monkeys all abloom,
and salmon made of chrome."
The window is a door.
"A smallish boy named Fran,
a mile high and no more."
The lady is a man.
The window is east of the apple.
The window is west of the lake.
The lady is wearing a chapel.
"It looks like a venomous snake."
A man can be happy or sad
A breath can be shallow or baited
A door can be gingham or plaid
A chapel can be overrated
The lady is in the lake,
The lady is holding her breath...
When the lady is sad and the window is plaid
Then end the game in death.
Beauty. Thanks so much.
Lewis Carroll would be proud.