So I have a room in which there is a window-door. The window-door leads east, down to the backyard. However there is no direction east-down or at least I don’t think there is. In any case the player should logically be able to type e and fall down to the backyard. However, on the first storey the dining room also leads east to the backyard since the dining room is directly below the first room.
The problem is that a room can’t, for all I can tell, be two storeys high.
I know you can have something like “Instead of the player going west in the dining room: move player to backyard”, but it conflicts with Emily Short’s fancy status bar compass, since that direction will not be shown. Should I just get rid of the compass, or is there any way do this?
Sorry for basically spamming this forum with my inevitably silly questions, and thanks for the help.
Most IF would map the backyard east of both the upper room and the dining room, but only the lower story west of the backyard. See Writing with Inform, section 3.3 for how to make that happen. (There’s also a nice bit on windows in section 3.6 of the Recipe Book, which does a more thorough simulation of altitude in Example 181, ``A Haughty Spirit.’’)
Hmyeah, if you didn’t want to have a door there you could simply define a one-way connection between the Sample Room and the Sample Yard, but I think if you want a door you need to have a room on either side of it. So maybe define a dummy room, and when the player goes through the window automatically move them to the yard? Like so, but I’m not sure if it works:
[code]Sample Room is a room. The window is a door. It is west of Sample Room and north of Void.
The Other Room is below the Sample Room and east of the Sample Yard.
After going to Void:
say “You step through the window and fall to the sample yard.”;
move the player to Sample Yard.[/code]
The player should never be able to stay in Void; in a cursory test, going west from Sample Room yields the desired behavior. But I don’t know if there are other problems with doing this by an “after” rule (for instance, it might mess with other going rules).
[EDIT: I originally had that as a Carry Out rule, but forgot to test it – it doesn’t work, because the standard “move player and vehicle” rule fires after my “carry out going to void” rule, so you wind up in Void with a quick trip through Sample Yard. Bluh.]
UPDATE: Here’s the doorless version, with room descriptions:
Sample Room is a room. "An open window stands to the west. Stairs lead down."
The Other Room is below the Sample Room and east of the Sample Yard. "A doorway leads west and stairs lead up."
Sample Yard is west of Sample Room. "A doorway leads east."
After going west from Sample Room:
say "You step out the window and fall to the sample yard.";
continue the action.
I7 tries to make connections two-way when it can, so the connections from Other Room are two-way, but when it gets to “Sample Yard is west of Sample Room” it’s already put Other Room east of Sample Yard, so it just makes a one-way connection.
[And that “After” rule should probably be a report rule? going to stop writing awful code and do the work I need to be doing.]