Timeline "cutscenes" with Dialogue system triggers.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Vomdrache
Posts: 21
Joined: Wed Aug 18, 2021 1:00 pm

Timeline "cutscenes" with Dialogue system triggers.

Post by Vomdrache »

Hey there,

Currently in the processes of setting up some cutscenes using Unity's Timeline assets.

I have the timeline working where the player moves a bit and then a conversation starts. However, I would like to be able to have some game objects move, start a conversation, and then move more game objects after the conversation has completed.

I have three tracks on my timeline at the moment.
1) Player animation track
2) Player transform track
3) Dialogue System track

I attempted adding more movement using the same timeline, but it does not wait for the conversation to complete.

I'm assuming I may have to create multiple timelines, each beginning with animations/movements and ending with a dialogue starter.

Is there a standard practice to handling the communication between Timelines and the Dialogue system?

Thanks,
- Frank
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Timeline "cutscenes" with Dialogue system triggers.

Post by Tony Li »

Hi Frank,

There are two typical practices:

1. Control everything from inside the conversation. Create multiple small timelines, and kick them off in dialogue entries' Sequence fields using Timeline(play) sequencer commands.

2. Or control everything from inside a single timeline. Use the Start Conversation clip to start a conversation. The conversation's first dialogue entry can use a Timeline(speed) sequencer command to set the timeline's speed to zero. The last entry can set the timeline's speed back to 1.

If you want to mix timeline and conversation activity, you can use Continue Conversation clips to manually advance the conversation.
Vomdrache
Posts: 21
Joined: Wed Aug 18, 2021 1:00 pm

Re: Timeline "cutscenes" with Dialogue system triggers.

Post by Vomdrache »

Alright, I've got it mostly working!

I've been going down the route of handling it mostly via the timeline and using the timeline speed pause. I'm running into the issue where before the player selects "continue" for the dialogue - the timeline speed goes back to 1 since it's the last entry in the dialogue. Is it possible to easily inject the timeline(speed, playable director, 1) somewhere it would only run once the dialogue has ended?

Also I'm a bit confused on the usage of Continue Conversation clips. Could you elaborate on the difference between this type of clip and Start Conversation clips?
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Timeline "cutscenes" with Dialogue system triggers.

Post by Tony Li »

Hi,

The Start Conversation clip starts a conversation. By default, it starts at the beginning of the conversation.

Side note: You can configure Start Conversation to start at any dialogue entry. Some designers write their conversations so the nodes don't link together. They all come off the <START> node, and they use individual Start Conversation clips to start each dialogue entry when they want to show it.

The Continue Conversation clip simulates a continue button click. Other designers will set the Dialogue Manager's Subtitle Settings > Continue Button dropdown to Always. (Or they'll do it individually in the conversation's properties.) Then they'll use one Start Conversation to start the conversation at the beginning, and Continue Conversation clips throughout the timeline to advance the conversation to the next entry.
Vomdrache wrote: Fri Nov 19, 2021 9:58 amI've been going down the route of handling it mostly via the timeline and using the timeline speed pause. I'm running into the issue where before the player selects "continue" for the dialogue - the timeline speed goes back to 1 since it's the last entry in the dialogue. Is it possible to easily inject the timeline(speed, playable director, 1) somewhere it would only run once the dialogue has ended?
Try adding a command like this to the last entry's Sequence field:

Code: Select all

required Timeline(speed, YourTimeline, 1)@Message(Continued)
where YourTimeline is the name of the timeline (or 'speaker' or 'listener'). It will wait until it receives a sequencer message 'Continued', which is never actually sent by anything in the Dialogue System, so it will wait forever. When the player clicks the continue button, the Dialogue System immediately stops the current entry's Sequence. However, the 'required' keyword guarantees that the command will run when the player clicks continue even if it hasn't received the message yet.
Vomdrache
Posts: 21
Joined: Wed Aug 18, 2021 1:00 pm

Re: Timeline "cutscenes" with Dialogue system triggers.

Post by Vomdrache »

Awesome. Had to create a few different custom tracks, but I was able to achieve everything I wanted to while including the dialogue system!

The only outstanding issue regarding cutscenes is character idles not playing due to the timeline speed being set to 0. Although, I'm fairly confident that the solution involved moving those idle animations outside of the timeline.

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

Re: Timeline "cutscenes" with Dialogue system triggers.

Post by Tony Li »

Hi,

That's the way to do it. When Timeline controls an animator, it controls it 100%. Better to control those idles outside of Timeline, or use a clip that sets its parameters rather than controlling it directly.
Post Reply