In Yarn Spinner, you can send instructions to your game through commands. Commands look like this:
<<setsprite ShipName happy>>
There are two built-in commands in Yarn Spinner:
waitcommand pauses the dialogue for a specified number of seconds, and then resumes. You can use integers (whole numbers), or decimals.
// Wait for 2 seconds
// Wait for half a second
stopcommand immediately ends the dialogue, as though the game had reached the end of a node. Use this if you need to leave a conversation in the middle of an
ifstatement, or a shortcut option.
// Leave the dialogue now
// Leave the dialogue if we don't have enough money
<<if $money < 50>>
Shopkeeper: You can't afford my pies!