So I’m writing a story with a bunch of street intersections. When the player is on a corner, there will be a traffic light and two crosswalk lights, one for crossing north/south, and one for crossing east/west. It seems to me that there should be three objects in the world: the traffic light, and two crosswalk lights. However, the name of the crosswalk lights would be referred to differently depending on which intersection the player is in, for example “crosswalk light across Main” or “crosswalk light across First”.
Here’s how I’ve defined this:
"I like traffic lights" by "Robert Baruch"
Section "Traffic Lights"
The traffic light is an object. The traffic light can be green for north/south. The traffic light can be green for east/west. The traffic light is green for north/south.
The description of the traffic light is "The traffic light is green to [if green for north/south]north/south[else]east/west[end if] traffic."
A street corner is a kind of room.
A street corner can be a SE street corner.
A street corner can be a NE street corner.
A street corner can be a SW street corner.
A street corner can be a NW street corner.
A crosswalk light is a kind of thing. A crosswalk light can be ok to cross. A crosswalk light is usually not ok to cross. The description of the crosswalk light is "The crosswalk light indicates ['][if ok to cross]walk[else]don't walk[end if][']."
A crosswalk light can be for north/south crossing.
A crosswalk light can be for east/west crossing.
A crosswalk light has a text called cross street. Understand the cross street property as describing a crosswalk light. The printed name of a crosswalk light is usually "crosswalk light across [cross street]".
Section "Main"
SE corner of Main & First is a street corner. It is a SE street corner. The description is "This is the southeast corner of Main and First. Main runs north/south and First runs east/west."
The traffic light is in the SE corner of Main & First.
There is a crosswalk light with cross street "Main". It is in the SE corner of Main & First. It is for north/south crossing.
There is a crosswalk light with cross street "First". It is in the SE corner of Main & First. It is for east/west crossing.
Well, the problem is that I can’t seem to get the names working right:
I like traffic lights
An Interactive Fiction by Robert Baruch
Release 1 / Serial number 180225 / Inform 7 build 6M62 (I6/v6.33 lib 6/12N) SD
SE corner of Main & First
This is the southeast corner of Main and First. Main runs north/south and First runs east/west.
You can see a traffic light and two crosswalk lights here.
>look crosswalk
The crosswalk light indicates 'don't walk'.
>look crosswalk lights
You can't use multiple objects with that verb.
>look Main
You can't see any such thing.
The other thing I tried is, instead of assigning a text property to a crosswalk, I just defined two crosswalks (crosswalk north/south and crosswalk east/west), and set their printed name. While this got the story to ask which crosswalk I meant, it also wouldn’t accept “Main” or “First” as options:
A crosswalk light can be for north/south crossing.
A crosswalk light can be for east/west crossing.
Section "Main"
SE corner of Main & First is a street corner. It is a SE street corner. The description is "This is the southeast corner of Main and First. Main runs north/south and First runs east/west."
The traffic light is in the SE corner of Main & First.
There is a crosswalk light north/south. It is a crosswalk light. It is in the SE corner of Main & First. It is for north/south crossing. The printed name is "crosswalk light across Main".
There is a crosswalk light east/west. It is a crosswalk light. It is in the SE corner of Main & First. It is for east/west crossing. The printed name is "crosswalk light across First".
SE corner of Main & First
This is the southeast corner of Main and First. Main runs north/south and First runs east/west.
You can see a traffic light, a crosswalk light across Main and a crosswalk light across First here.
>look crosswalk
Which do you mean, the crosswalk light across Main or the crosswalk light across First?
>Main
You can't see any such thing.
I feel I’m close, but I just can’t see what I need to do. Any help is appreciated!
Thanks,
–Rob