Changing the Player's expression while an NPC speaks

The [expression:Name] token can be used in a character's speech text to change their expression midway through. However, this only affects the expression of the character who is speaking.

The script below allows you to change the Player's expression while any character is speaking, by using the [PlayerExpression:Name] token instead. To use it, paste its contents into a script named CustomPlayerExpressions.cs, and attach to your scene.

CustomPlayerExpressions.cs: