Page 1 of 1
How to control dialogue flow during the conversation.
Posted: Fri Jul 08, 2022 3:23 am
by lakshman
Hi Tony,
As I have created a SMS conversational flow, and everything is working as expected.
There are two questions :
1. I'm wondering how to control the flow like, on next button click I need to forward the conversation to the next dialogue and pervious button to replay previous dialogues. And also need to pause and play the current conversation without hiding the dialogue UI.
2. On sequencer I'm setting an pop-up image to display, but before closing the image. The next dialogue flow is starting. How to check until the image/game object is closed I don't want to start the next dialogue. After on close button click I need to start the next dialogue.
kindly point me on the right direction to achieve the above mentioned functionality or any references.
Thanks,
Lakshman
Re: How to control dialogue flow during the conversation.
Posted: Fri Jul 08, 2022 9:01 am
by Tony Li
Hi,
lakshman wrote: ↑Fri Jul 08, 2022 3:23 am1. I'm wondering how to control the flow like, on next button click I need to forward the conversation to the next dialogue and pervious button to replay previous dialogues.
Please see the Backtracking Example on the
Dialogue System Extras page.
lakshman wrote: ↑Fri Jul 08, 2022 3:23 amAnd also need to pause and play the current conversation without hiding the dialogue UI.
I don't understand. Are you asking how to keep the dialogue UI visible even when a conversation is not playing?
lakshman wrote: ↑Fri Jul 08, 2022 3:23 am2. On sequencer I'm setting an pop-up image to display, but before closing the image. The next dialogue flow is starting. How to check until the image/game object is closed I don't want to start the next dialogue. After on close button click I need to start the next dialogue.
Use the WaitForMessage() sequencer command on the dialogue entry node that shows the pop-up image, or make the command that hides the pop-up image wait for the sequencer message. For example, your entry's Sequence might look like:
Code: Select all
SetActive(PopUpImage1);
SetActive(PopUpImage1, false)@Message(ClosedPopUp)
When the player closes the image, send the sequencer message (e.g., "ClosedPopUp"). You can do this in C#:
Code: Select all
PixelCrushers.DialogueSystem.Sequencer.Message("ClosedPopUp");
Or with a Dialogue System Trigger. Put the Dialogue System Trigger on the pop-up image, and set its trigger dropdown to OnDisable. Set Add Action > Play Sequence. Set the Sequence to:
Re: How to control dialogue flow during the conversation.
Posted: Mon Jul 18, 2022 1:22 am
by lakshman
Hello Tony,
Firstly sorry for the late reply.
Thank you for pointing me to the right direction to achieve the required functionality.
Tony wrote:I don't understand. Are you asking how to keep the dialogue UI visible even when a conversation is not playing?
Yes, imagine there is a pause button when we click on the button I need to pause the current conversation without disabling the dialogue UI window.
Thank you,
Lakshman
Re: How to control dialogue flow during the conversation.
Posted: Mon Jul 18, 2022 8:30 am
by Tony Li
Hi,
You could do like the example scene in
this thread. Add a Canvas Group to the Dialogue Panel (if it doesn't already have one), and set its interactable property false. You can also pause the Dialogue System by calling DialogueManager.Pause(). (Call DialogueManager.Unpause() when you want to resume the conversation.)
Re: How to control dialogue flow during the conversation.
Posted: Fri Jul 22, 2022 3:32 am
by lakshman
Hello again,
Thank you Tony for the guidance. The functionality according to our need is fulfilled.
I have one more question
Is there is way to give hyper reference of a website in "Subtitle Panel" or "Response Panel" ?
Thank you,
Lakshman
Re: How to control dialogue flow during the conversation.
Posted: Fri Jul 22, 2022 8:44 am
by Tony Li
Hi Lakshman,
Yes, use TextMesh Pro (see
TextMesh Pro Support) and
<link> tags. You will have to write the code that makes the <link> tag open a website (e.g., using Application.OpenURL).