Random Dialogue
This tutorial builds upon the first interaction tutorial. It is also best to first read the Facts documentation.
In this tutorial, you will learn how to use dynamic variables and create a random spoken using them.
Creating random dialogue
First, you need to open the inspector of the spoken you created from the first interaction tutorial. Then click on the just above the Text field and click on Add random Variable
.
This will create a random variable inside a static page.
Configuring the random variable
After creating the random variable, open the inspector of the random variable. Here, you can add multiple values to the random variable. Now, every time a spoken is triggered, a different message will be displayed from that random variable.
For this tutorial, we chose to add the following lines, but this can be anything you want:
Hello! I am a flower.
, Wow, you found me.
, Hey you!
Your dynamic variable should now look like:
Removing the random variable
To remove a dynamic variable, just click on the icon next to the dynamic variable.
Result
Now, every time the spoken is triggered, a random message will be displayed from the random variable.