Skipping to next conversation node in Cinemachine

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
bluebuttongames
Posts: 91
Joined: Tue Jul 14, 2015 8:22 am

Skipping to next conversation node in Cinemachine

Post by bluebuttongames »

Hi there,

I have a timeline setup in unity, cinemachine cameras, I have a conversation track and a continue conversation track.

What I'm looking to do is skip to the next line, is there a simple way to do that? One option would be to somehow get all the clips from the timeline in some way, store their start times and just set the playable director current time, how might I do that?

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

Re: Skipping to next conversation node in Cinemachine

Post by Tony Li »

Hi,

Do you want to fast-forward the entire track to the next Continue Conversation clip? Skipping might work, but you might want to fast-forward so any one-off actions between the current time and the next Continue Conversation clip will run.

I haven't done that, but I think the easiest way may be to use Timeline Signals. Add a signal in front of each Continue Conversation clip. If you're fast-forwarding, then whatever listens for that signal can set the timeline back to normal speed.

You have to use signals, and not rely on the Continue Conversation clip being called, because Timeline can skip over very short custom clip types if you're fast-forwarding very fast.
OutbackGames
Posts: 14
Joined: Fri Mar 19, 2021 7:38 am

Re: Skipping to next conversation node in Cinemachine

Post by OutbackGames »

Came to the forum looking for the same/similar sort of thing, I think what they're trying to do is use the continue button to continue a conversation during a timeline.

I'm similarly looking at how I can use the timeline but wait until a conversation is complete before moving on with the timeline. i.e. Animation & Other Timeline + Conversation synchronous; Animation Completes; Waiting on conversation -> Conversation Completes -> Timeline Continues.
I also have slate so If this is not possible with Unity is it possible with Slate?

If neither are possible I suppose the only option is to break up the timelines so that the conversation is run at the end of a timeline and the dialogue starts a new timeline on completion.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Skipping to next conversation node in Cinemachine

Post by Tony Li »

Hi,
OutbackGames wrote: Thu Nov 11, 2021 10:40 pmCame to the forum looking for the same/similar sort of thing, I think what they're trying to do is use the continue button to continue a conversation during a timeline.
One way to do that is to set the timeline's speed to zero when the typewriter is done typing, and set it back to 1 when the continue button is clicked. Example sequence:

Code: Select all

Timeline(speed, MyTimeline, 0)@Message(Typed); // Pause timeline when done typing.
required Timeline(speed, MyTimeline, 1)@Message(Continued); // Resume timeline when continue is clicked.
OutbackGames wrote: Thu Nov 11, 2021 10:40 pmI'm similarly looking at how I can use the timeline but wait until a conversation is complete before moving on with the timeline. i.e. Animation & Other Timeline + Conversation synchronous; Animation Completes; Waiting on conversation -> Conversation Completes -> Timeline Continues.
You could use use Timeline(speed) in the first and last nodes of the conversation, or in Dialogue System Triggers set to OnConversationStart & OnConversationEnd that use Actions > Play Sequence.
Post Reply