Please forgive me if I’m explaining the obvious: it’s just that I know from experience how frustrating it can be when everyone skips from step One to step Five because they’ve done it so often that steps Two to Four seem obvious.
Just to start from the beginning: what you’re looking at is a page with a square grid (a bit like graph paper) for the background, and boxes joined together with arrows (or just a single box if you’ve opened a fresh story.) Correct?
Unless you’ve chosen a different format, you’re using the Harlowe format. Harlowe 3.1.0 to be precise, and it’s important to tell people the version because the available features vary between versions.
Each of those boxes is what Twine calls a passage. A passage has a header (shown in bold) which is how the system distinguishes one passage one from another, and a body, which contains the text which the player sees. In Harlowe, headers are not shown to the player (so you don’t have to worry about them providing spoilers, for example.)
Here on the forum it’s not very easy to describe the visual metaphors that the GUI uses, so we use Twee notation instead. (Twee notation is a way of writing Twine games using only a text editor.)
This is what a Passage looks like in Twee notation:
This is the body of this passage. Everything written here, up until the next header will be rendered to screen.
This is a different passage.
So if someone on the forum gives examples, all you have to do is add a new passage in the GUI for each passage in the example and copy/paste the passage header/s and passage body/ies in the appropriate place.
So, to finally get to your question!
If you want to display a bit of text as a random response to the player clicking on a link, then you need to use a macro, in this case the “either” macro. Macros are just pre-written bits of code that let you plug in the bits of information relevant to your game.
So let’s imagine the player is in the kitchen and you want to let them look out of the window.
The diswasher burbles happily to itself as you sit down with a mug of coffee.
[[look out the window]]
::look out the window
You look out of the window. (either:
"A cat slinks past.",
"The washing flaps in the breeze.",
"A jet screeches by overhead.",
"Jenny is playing on the swings.",
[[stop looking out of the window->kitchen]]
Macros are fussy about punctuation, but the layout is purely to make it easier for humans to read. You could put it all on one line if you wanted. But in Harlowe, for a macro to work, you must:
- put the name of the macro immediately after the opening parenthesis, followed by a colon,
- put the different responses in quote marks, and separate each response with a comma,
- end the macro with a closing parenthesis.
Notice the last link. This will show the text “stop looking out of the window” as the link, but will actually link back to the “kitchen” passage. It’s true that in this situation the player could get back to the kitchen by clicking on the curly “undo” arrow in the sidebar, but beware of this. If the “looking out of the window” passage ran some code to, say, start a saucepan boiling over, then the player using the “undo” arrow would also undo running that code, so the saucepan would never boil over!
You’ll also notice that there’s no space between “stop looking out of the window” and “kitchen.” That’s because to Twine, the passages “kitchen” and " kitchen" (note the space at the front) are different. This is a very easy way to introduce bugs into your game so it’s worth being careful over.
Anyway, hope this has been helpful; there’s a full list of macros in the Harlowe Manual.