Hello there,
I just start to use Dialogue System in timeline, but right now I can only use continue conversation track to automatically continue the dialogue. I want to manually control all the dialogue when the timeline starts to play, if I do not continue the conversation, the cutscene will not play the next step, once the specific dialogue entry is reached, the cutscene will play again, right now I am thinking of using PlayableDirector.Pause for each dialogue entry, or do I use several timelines connected by these specific dialogues? I am sorry for any inconvenience.
How to manually continue dialogue in timeline
-
- Posts: 12
- Joined: Thu Aug 05, 2021 5:15 pm
Re: How to manually continue dialogue in timeline
Hi,
It's better to set a timeline's speed to zero instead of calling the Pause() method. Otherwise, when you resume, it will re-execute all the actions at the current time in the timeline. That means it will re-show the dialogue entry.
Use the Timeline() sequencer command to set the timeline's speed. For example, say the PlayableDirector is on a GameObject named ExampleTimeline. Use this sequence:
If you're not already familiar with sequences, I recommend watching the tutorials: Cutscene Sequences Tutorials.
The first line sets ExampleTimeline's speed to zero. If the timeline were on the entry's speaker, you could change it to:
This way you don't have to know the GameObject name.
The second line waits for a message "Continued", which technically is never sent by anything, so it waits forever. However, since it has the "required" keyword, it will still run when the player advances the conversation by clicking the continue button.
Instead of entering this on every dialogue entry, inspect the conversation's properties. Tick Override Display Settings > Camera & Cutscene Settings. Then set the Default Sequence there.
It's better to set a timeline's speed to zero instead of calling the Pause() method. Otherwise, when you resume, it will re-execute all the actions at the current time in the timeline. That means it will re-show the dialogue entry.
Use the Timeline() sequencer command to set the timeline's speed. For example, say the PlayableDirector is on a GameObject named ExampleTimeline. Use this sequence:
Code: Select all
Timeline(speed, ExampleTimeline, 0);
required Timeline(speed, ExampleTimeline, 1)@Message(Continued)
The first line sets ExampleTimeline's speed to zero. If the timeline were on the entry's speaker, you could change it to:
Code: Select all
Timeline(speed, speaker, 0);
The second line waits for a message "Continued", which technically is never sent by anything, so it waits forever. However, since it has the "required" keyword, it will still run when the player advances the conversation by clicking the continue button.
Instead of entering this on every dialogue entry, inspect the conversation's properties. Tick Override Display Settings > Camera & Cutscene Settings. Then set the Default Sequence there.
-
- Posts: 12
- Joined: Thu Aug 05, 2021 5:15 pm
Re: How to manually continue dialogue in timeline
Hi Tony,Tony Li wrote: ↑Sun Dec 12, 2021 4:00 pm Hi,
It's better to set a timeline's speed to zero instead of calling the Pause() method. Otherwise, when you resume, it will re-execute all the actions at the current time in the timeline. That means it will re-show the dialogue entry.
Use the Timeline() sequencer command to set the timeline's speed. For example, say the PlayableDirector is on a GameObject named ExampleTimeline. Use this sequence:
If you're not already familiar with sequences, I recommend watching the tutorials: Cutscene Sequences Tutorials.Code: Select all
Timeline(speed, ExampleTimeline, 0); required Timeline(speed, ExampleTimeline, 1)@Message(Continued)
The first line sets ExampleTimeline's speed to zero. If the timeline were on the entry's speaker, you could change it to:
This way you don't have to know the GameObject name.Code: Select all
Timeline(speed, speaker, 0);
The second line waits for a message "Continued", which technically is never sent by anything, so it waits forever. However, since it has the "required" keyword, it will still run when the player advances the conversation by clicking the continue button.
Instead of entering this on every dialogue entry, inspect the conversation's properties. Tick Override Display Settings > Camera & Cutscene Settings. Then set the Default Sequence there.
Thank you for the reply, and I appreciate the detailed sequencer command. I am truly amazed by the second line that you can do that. I still have a confusion about the sequencer in the following scenario. Suppose I have a speaker start a conversation at point A, after several dialogue texts, when the player clicks continue, the speaker moves to point B, during the movement time, I want to hide the whole dialogue UI, after speaker reaches the destination, the UI shows up again and the next dialogue pops up. From what I understand, I should use HidePanel() sequencer command.
I think I will use something like:
Code: Select all
HidePanel(0);
Timeline(speed, speak, 0)@10;
required Timeline(speed, ExampleTimeline, 1)@Message(Continued)
Or do I add an empty dialogue entry between these two with sequencer:
Code: Select all
HidePanel(0);
Continue()@10
Re: How to manually continue dialogue in timeline
Hi,
You can use HidePanel(#) -- or, if you want to hide the entire dialogue UI, use SetDialoguePanel(false). If you use SetDialoguePanel(false), then you must use SetDialoguePanel(true) in the next dialogue entry.
Yes, you can use an empty dialogue entry. If you do, I recommend using a Continue Conversation clip instead of Continue()@10. This way you can slide the clip around to match the length of the movement in your timeline. But using Continue()@10 is fine, too.
You can use HidePanel(#) -- or, if you want to hide the entire dialogue UI, use SetDialoguePanel(false). If you use SetDialoguePanel(false), then you must use SetDialoguePanel(true) in the next dialogue entry.
Yes, you can use an empty dialogue entry. If you do, I recommend using a Continue Conversation clip instead of Continue()@10. This way you can slide the clip around to match the length of the movement in your timeline. But using Continue()@10 is fine, too.
-
- Posts: 12
- Joined: Thu Aug 05, 2021 5:15 pm
Re: How to manually continue dialogue in timeline
Hi Tony,Tony Li wrote: ↑Sun Dec 12, 2021 8:03 pm Hi,
You can use HidePanel(#) -- or, if you want to hide the entire dialogue UI, use SetDialoguePanel(false). If you use SetDialoguePanel(false), then you must use SetDialoguePanel(true) in the next dialogue entry.
Yes, you can use an empty dialogue entry. If you do, I recommend using a Continue Conversation clip instead of Continue()@10. This way you can slide the clip around to match the length of the movement in your timeline. But using Continue()@10 is fine, too.
Thank you for your reply, I am using the continue conversation clip, I am confused why I can stretch the start conversation and continue conversation clip, I think only the start frame matters right? or do these clips have any other use cases?
Re: How to manually continue dialogue in timeline
Hi,
Yes, only the start frame matters. But they have an "Update Duration" button that takes a best guess at the length that the line will be shown, to help with timing other activity in the timeline. You can then stretch out the clip to its duration. If the conversation is linear, the durations should be accurate. If the conversation can branch, it's a best guess because we can't know ahead of time which branch it will take based on conditions.
Yes, only the start frame matters. But they have an "Update Duration" button that takes a best guess at the length that the line will be shown, to help with timing other activity in the timeline. You can then stretch out the clip to its duration. If the conversation is linear, the durations should be accurate. If the conversation can branch, it's a best guess because we can't know ahead of time which branch it will take based on conditions.