Discussion:
I7: Opening (unlocking) a painted (locked) window (door) with a key (scredriver)
(too old to reply)
h***@gmail.com
2007-06-17 05:46:11 UTC
Permalink
So, I want to have a window that the player can climb through. The
documentation is pretty clear on how that's done; make the window a
door, but call it "window." But I want the window to be painted shut,
and the only way to open it is to jimmy it with a screwdriver.

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
time.)

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.

So, thanks.

Emil, the Poorly Informed
Emily Short
2007-06-17 06:38:38 UTC
Permalink
Post by h***@gmail.com
So, I want to have a window that the player can climb through. The
documentation is pretty clear on how that's done; make the window a
door, but call it "window." But I want the window to be painted shut,
and the only way to open it is to jimmy it with a screwdriver.
How about something like this:

<code>
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".
</code>
Jerome West
2007-06-17 10:57:28 UTC
Permalink
Post by Emily Short
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.
h***@gmail.com
2007-06-18 17:21:57 UTC
Permalink
Post by Jerome West
Post by Emily Short
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.
Lewis Carroll would be proud.

h***@gmail.com
2007-06-18 17:20:22 UTC
Permalink
Post by Emily Short
Post by h***@gmail.com
So, I want to have a window that the player can climb through. The
documentation is pretty clear on how that's done; make the window a
door, but call it "window." But I want the window to be painted shut,
and the only way to open it is to jimmy it with a screwdriver.
<code>
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.
say "It seems to be painted shut."
say "You have adequately freed the window."
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.]
now the window is not lockable;
now the window is open.
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".
</code>
Beauty. Thanks so much.
Loading...