Page 1 of 1
Continue dialogue by Animator
Posted: Wed Oct 10, 2018 10:22 am
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.
Re: Continue dialogue by Animator
Posted: Wed Oct 10, 2018 1:12 pm
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.
Re: Continue dialogue by Animator
Posted: Thu Oct 11, 2018 8:17 am
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 (60.75 KiB) Viewed 1028 times
Re: Continue dialogue by Animator
Posted: Thu Oct 11, 2018 10:47 am
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.
Re: Continue dialogue by Animator
Posted: Thu Oct 11, 2018 11:01 am
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
Re: Continue dialogue by Animator
Posted: Thu Oct 11, 2018 7:30 pm
by Tony Li
Hi,
I was just about to reply. I'm glad you found answers already.