Hi, how do I make a scene begin three turns after the player has read a note? (I tried to find this in the manual but didn’t manage to do so.)
There’s a number of ways you could code this. Here’s one:
The Study is a room. The player is in the Study. Printed matter is a kind of thing. Printed matter has a truth state called was-it-read. The was-it-read of printed matter is usually false. A cutting note is printed matter in the Study. The description of the note is "It's a note from Marianne. 'We're through, you jerk' is all it says." After examining the note: now was-it-read of the note is true. Numbness is a scene. Numbness begins when was-it-read of the note is true. Numbness ends when the time since Numbness began is three minutes. Sadness is a scene. Sadness begins when Numbness ends. When Sadness begins, say "The full implications of what Marianne has said break through the numbness you've been feeling. Oh! Marianne!".
Note that you’re tracking whether something has been read by setting an attribute on a new kind of thing that you create, which might be handy if you’re going to be doing this more than once in the game. Note, too, that there’s an intermediate scene to hold off for three turns, but that that intermediate scene does nothing else.
I’m assuming that you’re OK with Inform’s default mapping of
> read to the examine action, but if you’re redefining READ to be something else, the code above will be easy enough to adapt.
Note, also, that what you mean by “three turns after” might not be what Inform means by “three turns after,” in which case you might want to bump it up to four or five:
Study You can see a cutting note here. >read note It's a note from Marianne. "We're through, you jerk" is all it says. >z Time passes. >z Time passes. The full implications of what Marianne has said break through the numbness you've been feeling. Oh! Marianne!
Great, thank you very much for the thorough explanation Patrick!
Glad to be helpful!