Built-in Commands
These commands come with Yarn Spinner and work automatically without any setup
Wait
Syntax:
<<wait [seconds]>>
Parameters:
| Parameter | Type | Description |
|---|---|---|
| seconds | number | How long to pause (can use whole numbers or decimals) |
Examples:
Character: I have something important to tell you.
<<wait 2>>
Character: Are you ready to hear it?
Pauses for 2 seconds between the two lines, creating dramatic tension
Character: Wait for it...
<<wait 0.5>>
Character: Surprise!
Pauses for half a second, creating a quick beat between lines.
Stop
Immediately ends the conversation, even if there are more lines written below
Syntax:
<<stop>>
Examples:
Shopkeeper: Welcome! Would you like to buy something?
<<if $money < 10>>
Shopkeeper: Oh wait, you don't have enough money.
<<stop>>
<<endif>>
Shopkeeper: Here's what I have in stock...
If the player doesn't have enough money, the conversation ends early and never reaches the "Here's what I have in stock" line.
Guide: Follow me into the cave!
<<if $hasLight == false>>
Guide: Wait, you don't have a light source. Come back when you're prepared.
<<stop>>
<<endif>>
Guide: Let's explore together!
Stops the conversation if the player is unprepared, preventing them from continuing.