Press "Enter" to skip to content

Randomness

Random text selection

The (either: ) macro can be used to randomly select one word/sentence from a list.

It is (either: "sunny", "cloudy", "rainy") today.

Sample result

Sample result: It is cloudy today.

Random number selection

The (random: ) macro can be used to randomly select an integer number from a particular range.

You have tossed a dice and the result is: (random: 1, 6)

Sample result

Sample result: You have tossed a dice and the result is: 4

Shuffling elements

The (shuffled: ) macro can be used to shuffle specific elements.

The password to open the door is: (shuffled: 1, 2, 3, 4, 5, 6)
A shopping list: (shuffled: "tomatoes", "milk", "vegetables")

Sample result

Sample result: The password to open the door is: 4,5,2,3,6,1. A shopping list: milk, tomatoes, vegetables.

Random text style selection

If you wish to randomly select the style for a particular fragment of the text, you can use the (text-style: ) macro and the (either: ) macro. The (either: ) macro can be also combined with other macros, for example the (text-colour: ) macro etc.

(text-style: (either: "italic", "blur", "rumble"))[What style am I?]

Sample result

Sample result (blurry text): What style am I?

A random fragment of the story

Use the (display: ) macro and the (either: ) macro to show the content of the randomly selected slip (an existing fragment of the story) on another slip. You can do this while selecting questions for the players, combining several other stories into one fragment or selecting which story players shall become familiar with at the beginning of the game (while, for example, there are 3 different stories).

No arrows

Please, note that while using the (display: ) macro, there are no arrows between the slips. Therefore, use this macro carefully – its chaotic use can easily lead to a lot of confusion within your own story.

The content of the initial slip.
---
(display: (either: "question 1", "question 2", "question 3"))

Example – an editor view

Twine - View from the editor. The start card is not connected with an arrow with any other card. Question 1, question 2, question 3 are checked with check 1, check 2, check 3. There is a note on the spot: game over.

More information

Font Resize
Contrast