Animator Converstation using AnimatorPlay

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
WaWa
Posts: 16
Joined: Tue May 21, 2024 6:03 am

Animator Converstation using AnimatorPlay

Post by WaWa »

Hi !

I just followed your Youtube
- YT AnimatorPlay
- URL YT Animator Disable when Conversation start

I have encounter problem
I have successed AnimatorPlay(Waving) and not moving when talking to an NPC like this...
Image
Image

--> However, once the NPC has finished speaking, our character isn't animated in any way—it can't run, walk, or idle, just fly move. How can I get his animator back once NPC's talking is done?

oh and Also
How can our character use animation to interact with a NPC?
By step like..
-> when our character uses DSU's default key (E) to initiate animation Waving to a NPC
-> after animation waving done
-> a NPC start a conversation.

Thank you and have a nice day!
User avatar
Tony Li
Posts: 21055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Animator Converstation using AnimatorPlay

Post by Tony Li »

Hi,

Are you using the Starter Assets third person controller? If so, please see: How To: Configure Starter Assets First/Third Person Controller

Here are two ways to play a waving animation before starting the conversation:

1. Start the conversation immediately using the Selector/Proximity Selector and Dialogue System Trigger. In the first dialogue entry (linked from <START>), leave the Dialogue Text blank and set the Sequence to something like:

Code: Select all

SetDialoguePanel(false, immediate);
AnimatorPlayWait(Wave)->Message(Done);
required SetDialoguePanel(true)@Message(Done);
Continue()@Message(Done)
2. Or configure your own interaction system that waves and then calls the Dialogue System Trigger's OnUse() method.
User avatar
WaWa
Posts: 16
Joined: Tue May 21, 2024 6:03 am

Re: Animator Converstation using AnimatorPlay

Post by WaWa »

Hi
Thank you for the response!

It's worked that our Actor back to the animation after dialogue with NPC, by using PlayerInput.DeactiveInput-ActiveInput (rather than ThirdPersonController bool) that you gave the link.

But, our Actor is waving while NPC start conversation at same time (I am using Lively Chat Bubble). I copy and paste your text too.

this image, I put the Dialogue System Trigger on our Actor.
Image

perhaps that because I am using LCB, so as not SetDialoguePanel? or something?

edit updated : I almost misunderstood, then I just now tried that to Dialogue Conversation <Start>, I created Node between <Start> and first Entry. I leave empty at Dialogue Text and put your text to Sequence. It didnt work, It showed the default panel response instead.

Thank you and have nice day
Last edited by WaWa on Tue May 28, 2024 11:05 pm, edited 1 time in total.
User avatar
Tony Li
Posts: 21055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Animator Converstation using AnimatorPlay

Post by Tony Li »

Hi,

Add the node to the conversation instead:

setDialoguePanelFalse.png
setDialoguePanelFalse.png (72.07 KiB) Viewed 719 times
User avatar
WaWa
Posts: 16
Joined: Tue May 21, 2024 6:03 am

Re: Animator Converstation using AnimatorPlay

Post by WaWa »

Hi,

yes I just have tried
I almost misunderstood, anyway. It didnt work, It showed the default panel response instead. like this image below
Image

Thank you
User avatar
Tony Li
Posts: 21055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Animator Converstation using AnimatorPlay

Post by Tony Li »

Hi,

That looks like the response menu panel. Make sure the dialogue entry node isn't blue (i.e., assigned to the Player) and/or inspect the Dialogue Manager GameObject and UNtick Display Settings > Input Settings > Always Force Response Menu. (More info: How To: Bypass Response Menu When Player Has One Choice)
User avatar
WaWa
Posts: 16
Joined: Tue May 21, 2024 6:03 am

Re: Animator Converstation using AnimatorPlay

Post by WaWa »

Hi,

yes, its worked! Thank you very much for the responses.
oh one more thing. when NPC dialogue is done. but for some reason it need click again to finish (back to game)
chronology :
- Actor wave animation
- NPC speak "Hi"
- NPC speak "how are you?"
- then we can't continue move anywhere unless we need click again to finish.
Image

How can solve it? by after "How are you?", then we can move

Thank you
User avatar
Tony Li
Posts: 21055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Animator Converstation using AnimatorPlay

Post by Tony Li »

Hi,

Do you need that final dialogue entry node? If not, delete it.

If you need it for some reason, include a Continue() sequencer command in its Sequence field. Example:

Code: Select all

required AnimatorPlay(Idle);
Continue()
User avatar
WaWa
Posts: 16
Joined: Tue May 21, 2024 6:03 am

Re: Animator Converstation using AnimatorPlay

Post by WaWa »

Hi,

oh I thought like Default that must not deleted haha, OK I deleted <END> , it's worked!

Thank you for these responses, really appreciated!
User avatar
Tony Li
Posts: 21055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Animator Converstation using AnimatorPlay

Post by Tony Li »

Glad to help!
Post Reply