[I7] Initial action in starting room

If I’d want something to happen upon a first visit of a room I’d use something like “before entering…”. How can I achieve that for the starting room? That room is “entered” before I get the chance to intercept the player.

Before entering doesn’t actually work, unless the player happens to be explicitly using enter to get there. (And even then, not always – entering is for movement within a room, not between rooms.)

The generic way to do something before entering a room would be to use something like:

Before going to Sauna for the first time:
	say "As you open the door, a huge burst of steam escapes from the room."

This doesn’t work for the initial location, of course, because the player isn’t going there, they’re already there. For that, you can use when play begins, which occurs at a similar time (just prior to printing the room description).

If you’d rather do something after showing the room description, while there are other ways to do it, I usually prefer using something like the following:

Every turn when the location is Laboratory for the first time:
	say "A small beaker smashes onto the floor as you enter."

But this doesn’t work on the first turn, since the “every turn” rules are only run after a turn, not prior to the first turn. For this (and only this case – this doesn’t work properly for any room other than the initial location) you could use:

After looking in Laboratory for the first time:
	say "Apparently the bell rang long ago but nobody woke you up.";
	continue the action.

Don’t forget that final line or it will cut a few (mostly invisible) things short.

Works like a charm. Thanks Gavin!!