Initial text after play begins

There’s no doubt in my mind that the answer to this question is exceedingly obvious, but I can’t find it anywhere in the manual.

I know that you can insert text before gameplay begins by using

When play begins: say "Blah blah blah."

But most IF I’ve played also has some initial text that appears only once, but after gameplay begins. So the title and game information is shown, the room is listed, and it says something like

and if you look around again, it just says

How do I add the initial text (in this case, “You’ve never seen this room before.”)?

You can do this at different layers of implementation, which is a fancy way of saying that you can do it in the description itself or, for instance, as part of a rule.

The first method is used fairly often.

The description of the Starting-Room is "[if unvisited]You've never seen this room before. [end if]Three large windows loom above a wall to the north."

Or:

The description of the Starting-Room is "[first time]You've never seen this room before. [only]Three large windows loom above a wall to the north."

The difference is that first time/only is a general tool; it works in any string. “Unvisited” is only meaningful in room description strings.

I never heard of this term. It’s awesome. Thank you.

Incidentally: [first time]/[only] really deserves its own documentation page. I read on the ‘one-shot text’ extension description that it had been implemented as a general feature of Inform; then proceeded to totally miss it at the bottom of the ‘text with random variations’ page. :blush:

Yet another option is:

The description of the Starting-Room is "[one of]You've never seen this room before. [or][stopping]Three large windows loom above a wall to the north."

True, it’s the weakest option in this case, but it’s often a good general option because a) you can have a different text display the second time (ie, [one of]You’ve never seen this room before.[or]You’ve been in this room before.[stopping]) and b) you could make it display more than two variations (ie, [one of]You’ve never seen this room before.[or]You’ve been in this room once before.[or]You’ve been in this room several times.[stopping]).

Thanks so much to all of you for the tips–they all work, and the [first time] term is a godsend for this type of thing.

This is awesome. Never knew about the [first time].
Does that mean that one can type [second time] [third time] etc?
What format woudl that take?
A: Say “[first time] One [second time] Two [third time] three [only]” or
B" Say “[first time] One [only][second time] Two [only][third time] three [only]”

?

Man that would save me trouble with “instead of examining… for the second/third/fourth time”

Also, are there variations on [only]?

To define sequential variations like that, use:

“[one of]First[or]Second[or]Third[stopping]”

You can have as many of those as you want. The “[stopping]” tag means to print the variants in sequence, and then stick with the last one. See manual chapter 5.7.