Hey. Thank you for this great video. I have some questions wrt to the animated sprites because it does not seem to work on my side. I have added a dialgoue actor component to the character and also verified that the animation controller is set when talking. So far it works fine. I have added two animations to the controller (Idle and Talk as in the example). And I have verified that the animation controller is actually used during the conversation. It seems that the state is always Idle and never switches to state Talk. Is there anything else I need to do? How is the state actually changed in code? i could not find the line in the code but knowing that might possibly help me figure out why the state is not changed. Thank you in advance.
Hi! We have a newer series of dialogue UI tutorials here:
However, they don't yet cover animated portraits. Animated portraits are covered in the manual here: https://www.pixelcrushers.com/dialogue_ ... dPortraits
Use AnimatorPlay() and/or AnimatorPlayWait() sequencer commands to control the portrait's animator controller. Take advantage of the keywords 'speakerportrait' and 'listenerportrait', which refer to the current dialogue entry's speaker and listener Portrait Images (the GameObjects that have the portrait animators). For example, to make the speaker play the Talk animation and then stop, use something like:If you'd like more details or have follow-up questions, please feel free to post on the forum: https://pixelcrushers.com/phpbb/Code: Select all
AnimatorPlay(Talk, speakerportrait); required AnimatorPlay(Idle, speakerPortrait)@Message(Typed)[
Yes, it should work like a regular animator. If the actor's portrait animator controller's default state plays an animation, it should play that animation without you having to specify anything. However, typically you'll want to start and stop animations (e.g., talk then idle), otherwise the character may keep flapping its mouth even when the conversation progresses to a different character.Shouldn’t the animation automatically work when having activated „UseAnimatedSprites“. Why use own sequencers command for that? And would I have to add that in every dialog node then? Isn’t that a hell of work? Or am I missing something?
You don't have to add it to every dialogue entry node. You can set the Dialogue Manager GameObject's Display Settings > Camera & Cutscene Settings > Default Sequence or the conversation's Conversation Properties > Override Display Settings > Default Sequence. For example, you could set it to something like:
Code: Select all
AnimatorPlay(Talk, speakerportrait);
required AnimatorPlay(Idle, speakerportrait)@{{end}}