Character portraits: Expressions

In the previous tutorial, we updated the default Subtitles menu to display a portrait graphic when a character speaks. Here, we'll assign more portraits that let us change the character's expression.

This technique also works with 3D characters, as we can define an Expression integer parameter that will also match the current expression's ID number.

At the bottom of your character's Player or NPC Inspector, check Use expressions?, and create two new expressions: Happy and Sad. Supply a new portrait graphic for each - hopefully better than the examples shown here:

We can change the character's expression by inserting tokens into speech text. The syntax is [expression:Name], where "Name" matches the name of the expression we've just defined. For example, this Dialogue: Play speech Action will show our character looking happy:

To clear the active expression, use the token [expression:None].

The Speech Manager gives us options to scroll speech text. If enabled, a single speech line can have as many tokens as we like:

The [wait:1] is another token that tells the scrolling subtitles to wait for 1 second. For more, see the Manual's Text tokens chapter.