Can I play the "Idle" and "Talking" animation using Dialogue System Events Component?

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can I play the "Idle" and "Talking" animation using Dialogue System Events Component?

Post by Tony Li »

Hi,

AnimatorBool() just sets an animator parameter. It doesn't monitor animation states or do anything else.

If you want to guarantee that the character stops talking, add the "required" keyword:

Code: Select all

AnimatorBool(talking, true);
required AnimatorBool(talking, false)@{{end}}
Normally AnimatorBool(talking, false) will run after the duration specified by {{end}}.

The "required" keyword guarantees that it runs even if the player skips ahead before reaching the {{end}} duration.
mindjar
Posts: 12
Joined: Tue Aug 06, 2019 11:22 am

Re: Can I play the "Idle" and "Talking" animation using Dialogue System Events Component?

Post by mindjar »

The "required" keyword did the trick! Thanks Tony! Everything is working flawlessly!

I was about to make a new thread but I'll ask here - do You know how to stop animations when starting conversation in Corgi? When using auto activation option on Conversation Zone it doesn't work as intended - the player animation doesn't stop, and the new Corgi engine Feedbacks don't stop either - You can hear footsteps sounds and see the particles.
How can I fix that?
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can I play the "Idle" and "Talking" animation using Dialogue System Events Component?

Post by Tony Li »

Good point about the new feedback system. I'll look into that. It'll probably be the same solution as for More Mountains' TopDown Engine, which uses the same feedback system. The animation issues are probably related.
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can I play the "Idle" and "Talking" animation using Dialogue System Events Component?

Post by Tony Li »

Hi,
mindjar wrote: Thu Oct 03, 2019 11:50 amDo You know how to stop animations when starting conversation in Corgi? When using auto activation option on Conversation Zone it doesn't work as intended - the player animation doesn't stop, and the new Corgi engine Feedbacks don't stop either - You can hear footsteps sounds and see the particles.
Sorry it took so long to get you an answer on this.

To turn off feedbacks, add a Dialogue System Events component to your player prefab(s). Assign feedbacks to the OnConversationStart() event, and call StopFeedbacks. If you want to resume any feedbacks when the conversation ends, assign them to OnConversationEvent() and call PlayFeedbacks(). In the screenshot below, when the player starts a conversation the DamageFeedbacks and AmbientFeedbacks stop. When the conversation ends, AmbientFeedbacks resumes.

corgiFeedbacks.png
corgiFeedbacks.png (21.14 KiB) Viewed 1038 times

If your player doesn't stop animations during conversations, tick the ConversationZone's ShouldUpdateState. This checkbox tells the player to enter its Idle state.
Brijac
Posts: 18
Joined: Sat Apr 25, 2020 5:40 pm

Re: Can I play the "Idle" and "Talking" animation using Dialogue System Events Component?

Post by Brijac »

Hey Tony, do you know how can I do this with Invector template? I have the same problem, when I enter the dialogue while running, the player keeps running until the end of the dialogue. I would also like to run a idle animation while in dialogue.
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can I play the "Idle" and "Talking" animation using Dialogue System Events Component?

Post by Tony Li »

Hi,

If you're using Invector, please use the setup instructions in Invector Support. It will stop your Invector character properly.
Brijac
Posts: 18
Joined: Sat Apr 25, 2020 5:40 pm

Re: Can I play the "Idle" and "Talking" animation using Dialogue System Events Component?

Post by Brijac »

I was following those instructions when I first combined Dialogue System and Invector Template into one project and I forgot to add "Dialogue System Invector Bridge". Now I just added that and it works perfectly :lol: .. thanks!
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can I play the "Idle" and "Talking" animation using Dialogue System Events Component?

Post by Tony Li »

Great! Happy to help.
Post Reply