2010-01-01 02:53:19 UTC
I'm new to the forum and a raw beginner to Inform7. I've been inside
of the documentation all day and need to go to a New Year's Eve
party! Below is the code, which is an expansion of Stephen Granade's
Tutorial pub'd in the Brass Lantern (http://www.brasslantern.org/
writers/howto/i7tutorial.html). My problem is this: I want the
player to have to brush his teeth before going to bed. I want to set
the property on the teeth to be brushed after he brushes, but it's not
letting me use the "now" command. I also want the player to have to
Thanks for any assistance, and apologies for any breach of
etiquette. -- Richard
"The Grand Tour" by Richard Smyth
The release number is 1. The story creation year is 2010. The story
headline is "A short I7 demonstration". The story genre is "Science
Fiction". The story description is "A small example of how to write
interactive fiction witn Inform 7".
When play begins: say "The intercom crackles to life. 'This is your
captain speaking. We're jumping to hyperspace shortly, so for your
protection, we've locked down all stateroom doors. As soon as we've
safely jumped, your doors will open and you will be free to move about
CHAPTER 1 - THE GAME WORLD
The Stateroom is a room. "Staterooms aboard a spaceship, even one as
luxurious as the Thaleia, are tight, cramped affairs, and this one is
no exception. There is barely enough room for you and your furniture.
The door to the hallway is locked tight for now. East is your
The hallway door is scenery in the Stateroom. Instead of opening or
entering the hallway door, say "The captain has locked all stateroom
doors in preparation for jumping to hyperspace."
The Bathroom is east of the Stateroom. The description is "Like your
stateroom in smallness, only moreso. There is a mirror and one wall."
The shower is here. It is fixed in place. "Opposite the mirror is the
shower, which is closed." The description of the shower is "When it's
open, you get in it to take a shower. Right now it's closed. keeping
you from using it." Instead of opening or entering the shower, say
"It is locked down until after the ship makes its jump to hyperspace."
The sink is here. It is a supporter. "Just through the door is your
standard spaceship sink." The description is "There's a bit of hair
left behind from the former occupant."
The toothbrush is on the sink. The description is "A brand-new orange
Oral-B toothbrush that looks like a psychadelic spaceship."
Understand "toothbrush" as a toothbrush.
The toothpaste is an openable container on the sink. The container is
closed. The description is "Sensodyne, for those sensitive gums of
yours." Understand "a toothpaste" as toothpaste. Understand "tube"
The leaflet is in the Stateroom. The description is "It goes on and on
about how wonderful the Thaleia is. Should you have trouble sleeping
later, reading this could help."
The bed is an enterable supporter in the Stateroom. The description
is "Crumpled sheets indicate that the previous night of sleep was not
at all restful."
Understand "furniture" as the bed. Instead of looking under bed, say
"You see the requisite warren of dust bunnies huddling from your
judgmental glare." Instead of taking bed, say "Why would you want to
do that?" Before entering the bed, say "(first taking off your shoes
The mirror is scenery in the Bathroom. The description is "You look
tired after your long shuttle flight to the Thaleia."
[START SAMPLE CODE FROM DOCUMENTATION]
[END SAMPLE CODE FROM DOCUMENTATION]
CHAPTER 2 - CHARACTERS
Robutler is a man in the Stateroom. "Robutler stands attentive to your
needs." The description of Robutler is "Robutler has four arms,
treads, and a shiny metal body." Understand "robot" and "butler" as
if Robutler is not visible begin;
move Robutler to the location of the player;
say "Robutler rattles into the room, following you.";
CHAPTER 3 - THE SLEEP PUZZLE
At 9:05 AM: say "You realize that you are becoming exhausted."
At 9:08 AM: say "Your exhaustion is threatening to send you crashing
to the floor, unable to move."
At 9:12 AM: say "You are about to drop dead of exhaustion. You really
should get in bed."
At 9:15 AM:
say "You stumble to your knees and then collapse on the floor,
quite surprised to find that the phrase 'drop dead of exhaustion' can
be literally true.";
end the game in death.
Instead of entering the bed:
say "You climb into the bed, exhaustion overtaking you. You are
asleep before you can order Robutler to undress you.";
end the game in victory.
CHAPTER 4 - BRUSHING TEETH PUZZLE
Teeth is a kind of thing. Teeth is part of every person.
Teeth can be brushed or unbrushed. Teeth is usually unbrushed. The
description of teeth is usually "Not something you really want to be
looking at too closely."
The description of the player teeth is "Pearly white!"
The description of Robutler's teeth is "Pearly white! And why
shouldn't they be? He's a robot and doesn't eat anything..."
Instead of entering the bed when teeth is unbrushed:
if teeth is unbrushed,
say "Aren't you going to brush your teeth? Your last trip to the
dentist was not pretty.";
if teeth is brushed,
say "Smacking your lips from the taste of Listerine, you prepare to
climb in to bed."
Brushing is an action applying to two things. Understand "brush
[something]" as brushing. Understand "brush" as brushing. Understand
"brush [something] with [something]" as brushing.
if the player is not holding a toothbrush, say "You're going to need
a toothbrush to do that." instead.
Carry out brushing:
if teeth are unbrushed, say "You vigorously brush your teeth the way
the orthodontist taught you, in an up-down fashion rather than a back-
and-forth fashion. Nothing can be more important than good hygiene!";
say "Now you're ready for bed."
Instead of brushing teeth when the toothpaste is closed:
say "You need to open the toothpaste first!"