Stop Timeline in ContinueConversationClip

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Tony Chou
Posts: 7
Joined: Wed Jun 23, 2021 11:39 pm

Stop Timeline in ContinueConversationClip

Post by Tony Chou »

I want the dialogue system to work like a movie narrator in unity Timeline.
1. When subtitle show , stop timeline until player press continue button.
2. Hide dialogue UI until next subtitle show.
How do I complete this feature?
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Stop Timeline in ContinueConversationClip

Post by Tony Li »

Hi,

There are two ways to do this:

Method 1:
  • Don't link your conversation's dialogue entry nodes linearly. Link them all from the <START> node.
  • Add a Conversation Track to your timeline, and use separate Start Conversation clips to show each node.
  • Set the Dialogue Manager's Subtitle Settings > Continue Button mode to Always.
  • Set the Dialogue Manager's Default Sequence to:

    Code: Select all

    Timeline(speed, timeline, 0); 
    required Timeline(speed, timeline, 1)@Message(Continued)
    where 'timeline' is the name of your PlayableDirector GameObject.
Method 2:
  • Link your dialogue entry nodes linearly.
  • Add a Conversation Track, and use a single Start Conversation clip to start the conversation.
  • Add a Continue Conversation Track, and use Continue Conversation clips where you want to show each next node.
  • Set the Dialogue Manager's Default Sequence, or the conversation's Conversation Properties > Override Display Settings > Camera & Cutscene Settings > Default Sequence, to:

    Code: Select all

    Timeline(speed, timeline, 0);
    required Timeline(speed, timeline, 1)@Message(ClosedSubtitle)
    where 'timeline' is the name of your PlayableDirector GameObject.
  • Set the Dialogue Manager's Subtitle Settings > Continue Button mode to Always.
  • Configure the continue button to call this script's CloseSubtitle method instead of actually continuing the conversation:
    CloseSubtitleButton.cs

    Code: Select all

    using UnityEngine;
    using PixelCrushers.DialogueSystem;
    public class CloseSubtitleButton : MonoBehaviour
    {
        public void CloseSubtitle()
        {
            GetComponentInParent<StandardUISubtitlePanel>().Close();
            Sequencer.Message("ClosedSubtitle");
        }
    }
Here's an example of method 2:

DS_TimelineContinueClipExample_2021-12-16.unitypackage
Post Reply