Animate Characters While Speaking

Announcements, support questions, and discussion for the Dialogue System.
User avatar
PayasoPrince
Posts: 104
Joined: Thu Jan 27, 2022 6:47 pm

Re: Animate Characters While Speaking

Post by PayasoPrince »

I have the sequence in a Dialogue System Trigger's Actions:

Image

I'm calling it from a Timeline's StartConversationClip.

Is there anyway to make it work this way? :?:

I imagine it would be pretty time consuming adding this to every node: :shock:

Code: Select all

AnimatorPlay(Talking);
required AnimatorPlay(Idle)@{{end}}
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Animate Characters While Speaking

Post by Tony Li »

Leave the node's Sequence fields blank.

Put that sequence in the Dialogue Manager's Display Settings > Camera & Cutscene Settings > Default Sequence.
User avatar
PayasoPrince
Posts: 104
Joined: Thu Jan 27, 2022 6:47 pm

Re: Animate Characters While Speaking

Post by PayasoPrince »

Hmm, I added it to the Dialogue Manager's Default Sequence section and still not playing. I also removed the node's sequence to make sure it isn't overriding it. :cry:


Image

Btw, if you notice a discrepancy between the animation names in my screenshots, I changed the animation names to a more generic "Talking" & "Idle" so that it can be used by all characters. The name shouldnt be the issue :oops:
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Animate Characters While Speaking

Post by Tony Li »

Temporarily set the Dialogue Manager's Other Settings > Debug Level to Info.

When each dialogue entry plays, check the Console log. You should see two lines for each of those three commands.

The first line reports how the sequencer has parsed the command and the time at which it will play. For AnimatorPlay(Talking) it should look similar to:

Dialogue System: Sequencer.Play( AnimatorPlay(Talking)@0 )

The second line appears when the command actually runs, and should look similar to:

Dialogue System: Sequencer: AnimatorPlay(Talking, <gameObject>)

where <gameObject> is the GameObject on which the Animator should be. The Animator can be on a child in its hierarchy.

Check that:

1. The commands are actually appearing in the Console, and

2. The correct GameObject(s) are being used.

If both of those things are correct, look for any other scripts that might be immediately switching the Animator to another state.
User avatar
PayasoPrince
Posts: 104
Joined: Thu Jan 27, 2022 6:47 pm

Re: Animate Characters While Speaking

Post by PayasoPrince »

Here's what the console says:

Image

The actor looks correct, but I did notice that it says "Sequencer.Play( None()@0 )".
It is also blank after is says (actor) says "

Any idea? :idea:
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Animate Characters While Speaking

Post by Tony Li »

Those Console lines are from the <START> node.

Does the conversation continue automatically after that, to the 'How about a little help up here' line?
User avatar
PayasoPrince
Posts: 104
Joined: Thu Jan 27, 2022 6:47 pm

Re: Animate Characters While Speaking

Post by PayasoPrince »

No, it doesn't continue automatically. It waits for the player to hit the Continue button.
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Animate Characters While Speaking

Post by Tony Li »

Try changing the <START> node's Sequence to:

Code: Select all

Continue()
If you're doing this in Timeline, it might be a quirk with the Timeline integration.
User avatar
PayasoPrince
Posts: 104
Joined: Thu Jan 27, 2022 6:47 pm

Re: Animate Characters While Speaking

Post by PayasoPrince »

Added Continue() to the start node and no dice. :cry:

I don't mind going about setting it up a different way. I really just want it to work.

Is it not possible to start a conversation with Timeline that waits for a continue button and also animates the actor? :|
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Animate Characters While Speaking

Post by Tony Li »

PayasoPrince wrote: Mon Feb 07, 2022 5:32 pmIs it not possible to start a conversation with Timeline that waits for a continue button and also animates the actor?
Here's an example that uses Continue Conversation clips to continue automatically:

DS_TimelineAnimateExample_2022-02-07.unitypackage

Here's an example that pauses the timeline until the player clicks the continue button:

DS_TimelineContinueClipExample_2022-02-07.unitypackage

It uses a small script, and it's based on the example here.
Post Reply