Changing expressions when characters speak

When Characters speak, you can opt to display a portrait graphic - this tutorial covers the step to do so. As of Adventure Creator 1.47, we swap out the portrait graphic while a character is speaking - allowing us to change a character's expression.

This technique also works with Mecanim characters in 3D, as we can define an "expression integer" parameter that changes instead or as well. This tutorial, however, will focus on changing portraits.

Assuming you already have a speech menu that can show a portrait graphic (as covered in the tutorial linked above), find the Player or NPC you wish to give expressions to, and look for the Dialogue settings panel at the bottom of their Inspector.

Check Use expressions?, and use the UI that appears beneath to define two expressions: Happy and Sad. Supply a new portrait graphic for each - hopefully better than the examples shown here:

We can now change our character's expression by inserting tokens into our speech text. The token's 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:

If our game scrolls subtitle text (a setting found within the Speech Manager) we can have as many such tokens in our dialogue lines, and the portraits will update accordingly:

The [wait:1] is another token that tells the scrolling subtitles to wait for 1 second. All possible tokens can be found in section 10.3 of the Adventure Creator manual.

The same tokens can be used for Mecanim-based characters: the expression integer parameter we can define will be changed to the expression's ID number, which is displayed just above it's Name field in the character's Inspector. For example, the Sad expression we defined has an ID number of 1.

"Adventure Creator" and this website are copyright Chris Burton, ICEBOX Studios

Go to top