How to Continue Conversations

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

How to Continue Conversations

Post by Tony Li »

This FAQ explains how to make conversations move from one dialogue entry node to the next.

There are two ways to move the conversation to the next node.

1. Normally, a conversation stays on a node (and keeps the subtitle visible) until its Sequence is done.

The player can cancel the Sequence early by pressing the Cancel Subtitle Input:

Image

This will immediately stop the Sequence and progress to the next stage of the conversation.

2. You can also configure the Dialogue Manager to wait for a continue button click. There are many options:

Image

If you set the Continue Button dropdown to a mode that tells the Dialogue System to wait for the player to click the continue button, it will activate your dialogue UI's continue button. The continue button's OnClick method can call the dialogue UI's OnContinue() method, or if your subtitle text uses a typewriter effect you can add a Continue Button Fast Forward component:

Image

If the continue button calls the Continue Button Fast Forward component's OnFastForward() method, the first click will fast-forward the typewriter to the end. If the typewriter is already at the end, it will call the dialogue UI's OnContinue() method, which will continue the conversation.

You can also manually simulate a continue button click by using the Continue() sequencer command in your Sequence. For example, to simulate a continue button click at the 2-second mark:

Code: Select all

Continue()@2
If you want to allow the player to click anywhere on the screen to continue:
  • Make the continue button cover the entire screen.
  • Set the continue button's Image alpha value to 0. This makes the button invisible.
  • You may want to tick the Dialogue Manager's Input Device Manager > Auto Focus. This will automatically focus the continue button so the player can press the joystick's 'A' button to use the continue button. If you want to map a different joystick button as a hotkey for the continue button, add a UI Button Key Trigger component to the continue button.
If the player presses the Cancel input or clicks the continue button, the conversation will immediately stop the current node's Sequence and progress to the next stage of the conversation. If the Sequence has commands that must run even if the node ends early, use the required keyword in front of the command.
User avatar
Alatriste
Posts: 181
Joined: Wed Nov 11, 2015 5:07 pm
Contact:

Re: How to Continue Conversations

Post by Alatriste »

This FAQ is really useful. Thanks!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to Continue Conversations

Post by Tony Li »

Version 2.0.5+ adds an additional way to continue conversations in Unity Timeline. If you want to time your conversation in a timeline, you can use the new Continue Conversation playable. This essentially just simulates a continue button click.
ffyhlkain
Posts: 3
Joined: Wed Jan 16, 2019 3:20 am

Re: How to Continue Conversations

Post by ffyhlkain »

Hey.
Thanks for the good tutorial. I'm wondering how to switch the possibility for the user to continue on button click during a conversation. I've tried to use

Code: Select all

SetContinueMode(false); Continue()@2;
(deactivate the manual continue option and continue after 2 seconds) but that only deactivates my continue button Icon.

Code: Select all

DialogueManager.IsDialogueSystemInputDisabled();
gives still false even if I set the mode to false.

How can I deactivate the Input for the user via a sequencer command?


Thanks for help.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to Continue Conversations

Post by Tony Li »

Hi,

There are two ways to "continue" a conversation.

1. The continue button or Continue() sequencer command.

2. The Cancel Subtitle Input defined in the Dialogue Manager's Input Settings. This cancels the current dialogue entry node and progresses to the next stage of the conversation. It's not actually a true continue. It's a cancel. But for the most part it appears to the player like a continue. This may be what you're seeing. If you don't want this, set Input Settings > Cancel Subtitle Input > Key to None and Button Name to a blank string. Or you can write a custom sequencer command that calls DialogueManager.SetDialogueSystemInput(bool).
ffyhlkain
Posts: 3
Joined: Wed Jan 16, 2019 3:20 am

Re: How to Continue Conversations

Post by ffyhlkain »

Perfect, works like a charm with the custom command now.

Thanks!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to Continue Conversations

Post by Tony Li »

Happy to help!
DragoonHP
Posts: 62
Joined: Tue Jan 15, 2019 8:17 am

Re: How to Continue Conversations

Post by DragoonHP »

If I have the continue button set to cover the entire screen, even if I click on the menu (AC Menu/Pause Menu), the click is passed to the continue button.
Any way to stop that? I've tried with Control Graphic Raycast ticked and unticked
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to Continue Conversations

Post by Tony Li »

The Dialogue Manager's Input Device Manager > Control Graphic Raycasters serves a different purpose. When the Input Device Manager is in Joystick mode, it prevents the mouse from being able click on any UIs. But, if Detect Mouse Control is ticked, then as soon as you move the mouse it will switch to Mouse mode and allow clicks on UIs.

Here are two suggestions:

1. If your AC pause menu is a Unity UI menu, set its Canvas order to be on top of the dialogue UI's Canvas. Make it cover the entire screen so it will block clicks. To make it cover the entire screen, you can create an invisible image that blocks raycasts.

2. If it's not a Unity UI menu, define action lists for when it opens and closes. When it opens, disable the dialogue UI however you prefer. For example, you could find the continue button and set its interactable value to false, or disable the dialogue UI's Canvas. When the menu closes, undo it.
DragoonHP
Posts: 62
Joined: Tue Jan 15, 2019 8:17 am

Re: How to Continue Conversations

Post by DragoonHP »

Thanks for the solutions Tony! :)
Post Reply