Character sprite in dialogue in yarn

hello, I want to display a character while the dialogue is running and I want the character to have different emotes while for certain sentences or parts of the dialogue?

so that if in the dialogue, the character who is speaking is sad, then the character’s sprite will be sad as well

What you want to do is use a command and tie that command with a object sprite in actions.
That object sprite will contain all the animations of the portraits.
In Yarn, you call those portraits via the animation name with the command.




Here is the command line example >




Here is the sprite object example >




Here is how it is called in yarn >




Then for resources to learn more


Here is the wiki that talks about this:
https://wiki.gdevelop.io/gdevelop5/all-features/dialogue-tree

Here is a YouTube video builds a dialogue system by hand with portraits:

Here is my template that you can use:

It is a project file that contains a dialogue system (with the foundation for portraits) and a save/load system if that is of interest to you ;D

4 Likes

Yayyy!! Thank you so much this helps alot! Thank you!! And thanks for including your template!

Everything is easier and makes more sense now waaaa (≧▽≦)

2 Likes