Continue dialogue by Animator

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
fanaei
Posts: 73
Joined: Wed Aug 15, 2018 10:38 am

Continue dialogue by Animator

Post by fanaei »

Hi
I wanted to know that how can I continue or change dialogue from Animator's animations?
(I prefer not to use Timeline)
I tried to use below code, but couldn't pass the dialogues by changing initialDialogueEntryID.

Code: Select all

DialogueManager.StartConversation (DialogueManager.MasterDatabase.GetConversation (ConversationId).Title, transform, NPCobj,DialogueId);
Also I had another question:
Is it possible to hide the Dialogue UI in the middle of an animation?
For example Player says something, then in the middle of conversation something happens and I don't want to show dialogue UI on that time, and then conversation continues.
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Continue dialogue by Animator

Post by Tony Li »

Hi,
fanaei wrote: Wed Oct 10, 2018 10:22 amI wanted to know that how can I continue or change dialogue from Animator's animations?
The Dialogue System is designed to go the other way. It runs the conversation and moves from node to node. Each node can run its own animation by using the Animation() or AnimatorPlay() sequencer command.

However, it's possible to make an animation control when the conversation continues to the next node. To do this, set the Dialogue Manager's Subtitle Settings > Continue Button mode to Always. In your animation, call the dialogue UI's OnContinue method.
fanaei wrote: Wed Oct 10, 2018 10:22 amIs it possible to hide the Dialogue UI in the middle of an animation?
For example Player says something, then in the middle of conversation something happens and I don't want to show dialogue UI on that time, and then conversation continues.
Yes. Just deactivate the dialogue panel or play its Hide animation.
fanaei
Posts: 73
Joined: Wed Aug 15, 2018 10:38 am

Re: Continue dialogue by Animator

Post by fanaei »

I'm using Dialogue UI as a prefab, so I don't know how to control the Continue Button or Hide the Dialogue panel!

I tried to use timeline, but using "start conversation clip" and changing Entry ID, doesn't change the dialogues automatically.
problem2.jpg
problem2.jpg (60.75 KiB) Viewed 1026 times
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Continue dialogue by Animator

Post by Tony Li »

Hi,
fanaei wrote: Thu Oct 11, 2018 8:17 amI'm using Dialogue UI as a prefab, so I don't know how to control the Continue Button or Hide the Dialogue panel!
You can add an instance of the dialogue UI prefab to your scene. This way you can inspect the continue button and dialogue panel.

You can also control the continue button by using sequencer commands:
fanaei wrote: Thu Oct 11, 2018 8:17 amI tried to use timeline, but using "start conversation clip" and changing Entry ID, doesn't change the dialogues automatically
This action tries to start a new conversation at that entry ID. Since a conversation is already active, it won't start the new one.

Let's step back. What do you want to accomplish? Maybe I can suggest the best way to accomplish it.
fanaei
Posts: 73
Joined: Wed Aug 15, 2018 10:38 am

Re: Continue dialogue by Animator

Post by fanaei »

Thank you Tony.
Found the answer for both of my questions.
On Timeline Passed the dialogues by: PlaySequenceClip and Continue() command
And Hided the Dialogue panel by: PlaySequenceClip and AnimatorTrigger(Hide,Dialogue Panel) command
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Continue dialogue by Animator

Post by Tony Li »

Hi,

I was just about to reply. I'm glad you found answers already.
Post Reply