Skip to main content

Text Variables

Text variables allow for the display of dynamic text in your sequences and choices. They can be used in two distinct ways.

note

Text variables add complexity that makes certain types of exports impossible. To continue supporting these exports (Lunii and PDF), you can create your story in simplified mode. However, in this case, text variables will not be activated.

A text variable has a name and a list of values. You can add as many values as you wish.

Creation of a text variable.

In the same way as other types of variables, you can add actions and conditions. Upon the launch of your story in the reader, text variables are initialized with the first value entered in their value list.

You can use actions to modify the value of a text variable (from its list of values), and you can use conditions to check its value. You will find more information on this in the section Actions and Conditions.

Displaying a variable in a text

You can display text variables in a text of a sequence or choice. For this, the Variable... button is available in the top right corner of the text editor.

Adding a variable in a text.

At the editor level, variables will be explicitly represented. You can also apply a style to them (bold, italic...).

Displaying a variable in the text editor.

Similarly, you can also display a counter type variable in the text of your sequences and choices.

Random Texts

Another use of text variables is the ability to choose a random value to display from its list of values! This helps give a less repetitive feel in cases of sequences (or choices) displayed multiple times.