Conditional Sentences
Sometimes you don't want to take completely different paths based on variables... all you really need is to say something a little different in a dialogue box. You can do that too! If you've ever used an IF function in excel this should feel familiar:
[[favorite_pet = cat 'cat toys' : 'dog toys']]
Let's break this down:
- The first part inside the brackets is a condition (favorite_pet = cat).
- Then a space, then option 1 in single quotes (cat toys).
- Then, after the colon the second option (dog toys).
- If the condition is true, the first option will be used. If it's false the second option will be used.
Since the app uses a single quote to determine the start and end of each option you can't currently use single quotes inside your sentences. This limitation will be fixed in an upcoming version.
Here's how this might look in Draw.io:
And here's how that would look in the avatar: