Overview

Link type How to write it in Twine
Link [[Link text]]
Link and passage title [[Link text|Passage title]]
Create variable in a link (text) [[Link text][$variable to "your cutom text"]]
[[Link text|Passage title][$variable to "your cutom text"]]
Create variable in a link (number) [[Link text][$variable to 33]]
[[Link text|Passage title][$variable to 33]]
Create variable in a link (true) [[Link text][$variable to true]]
[[Link text|Passage title][$variable to true]]
Create variable in a link (false) [[Link text][$variable to false]]
[[Link text|Passage title][$variable to false]]

2. Create a variable

2.1 Text and True/False

Information type How to write it in Twine
Create text <<set $variable to "Honk!">>
Create true <<set $variable to true>>
Create false <<set $variable to false>>

2.2 Number

Information type How to write it in Twine
Set a number <<set $variable to 1>>
Add a number to an exsisting variable <<set $variable to $variable + 2>>
Multiply a number to an exsisting variable <<set $variable to $variable * 2>>
Subtract a number from an exsisting variable <<set $variable to $variable - 2>>
Divide with an exsisting variable <<set $variable to $variable / 2>>
Use modulu on an exsisting variable <<set $variable to $variable % 2>>

3. Show content (if/else)

Information type How to write it in Twine (if) How to write it in Twine (if/else)
With text <<if $variable is "Left">>
Show this
<</if>>
<<if $variable is "Left">>
Show this
<<else>>
show instead this
<</if>>
With a number <<if $variable is 33>>
Show this
<</if>>
<<if $variable is 33>>
Show this
<<else>>
show this instead
<</if>>
With true <<if $variable is true>>
Show this
<</if>>
<<if $variable is true>>
Show this
<<else>>
show this instead
<</if>>
With false <<if $variable is false>>
Show this
<</if>>
<<if $variable is false>>
Show this
<<else>>
show this instead
<</if>>

3.1. More ways to show content with true/false

Information type How to write it in Twine (if) How to write it in Twine (if/else)
Is <<if $variable is true>>
Show this
<</if>>
<<if $variable is true>>
Show this
<<else>>
show this instead
<</if>>
Not equal <<if $variable neq true>>
Show this
<</if>>
<<if $variable neq true>>
Show this
<<else>>
show this instead
<</if>>

3.2. More ways to show content with a number

Information type How to write it in Twine (if) How to write it in Twine (if/else)
Is <<if $variable is 12>>
Show this
<</if>>
<<if $variable is 12>>
Show this
<<else>>
show this instead
<</if>>
Not equal <<if $variable neq 23>>
Show this
<</if>>
<<if $variable neq 23>>
Show this
<<else>>
show this instead
<</if>>
Greater than <<if $variable gt 23>>
Show this
<</if>>
<<if $variable gt 23>>
Show this
<<else>>
show this instead
<</if>>
Greater than or equal <<if $variable gte 23>>
Show this
<</if>>
<<if $variable gte 23>>
Show this
<<else>>
show this instead
<</if>>
Less than <<if $variable lt 23>>
Show this
<</if>>
<<if $variable lt 23>>
Show this
<<else>>
show this instead
<</if>>
Less than or equal <<if $variable lte 23>>
Show this
<</if>>
<<if $variable lte 23>>
Show this
<<else>>
show this instead
<</if>>

3.3 Check more variables at once

Information type How to write it in Twine (if) How to write it in Twine (if/else)
And <<if $variable is 12 and $door is true>>
Show this
<</if>>
<<if $picesOfCheese is 12 and $bredSlices is 6>>
Show this
<<else>>
show this instead
<</if>>
Or <<if $variable neq 23 or $name is "Jake">>
Show this
<</if>>
<<if $variable neq 23 or $door is "blue">>
Show this
<<else>>
show this instead
<</if>>

4. Textboxes

How to write it in Twine
<<textbox "$nameOfDog" "">>

5. Random

How to write it in Twine
<<set $variable to either("1","2","3")>>

6. Listbox

How to write it in Twine
<<listbox "$car" autoselect>>
<<option "Ford">>
<<option "Ferrari">>
<<option "Bugatti">>
<</listbox>>
<<listbox "$hair" autoselect>>
<<option "Long brown hair" "brown">>
<<option "Short blue hair" "blue">>
<<option "Bald" false>>
<</listbox>>