-
Notifications
You must be signed in to change notification settings - Fork 0
Expressions (emotions)
Character Editor supports face expressions (or emotions). Simple sprite swap is used to change emotions.
There are 3 basic expressions: [Default], [Angry], [Dead]. They are all in [Character.Expressions] list. If you'll open your character with an editor, you'll find:
- [Character] has [Expression] prorerty that controls characters' expression. It's expression name (string).
- [Character] also has [Expressions] list, each of its' items is a list of 3 sprites for eyebrows, eyes and a mouth.
You can change these properties manually or with an editor (from expressions section).
But how does the animation change the expressions? The animation simply calls an animation event [SetExpression] with an expression name. [AnimationEvents] script that is attached to a character handles all animation events and calls [SetExpression] on [Character].
Can I change the expressions manually? Sure, simple call [SetExpression] on [Character].
Can I add my custom expressions Sure, just extend [Character.Expressions] list and call [Character.SetExpression] (from a code).
Why some expression sprites are null? Yes, they can have null values. In this case, a sprite from the first expression in [Expressions] list will be used.