Best Practice for Timeline Control?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
jhaddock
Posts: 7
Joined: Mon Sep 13, 2021 2:56 pm

Best Practice for Timeline Control?

Post by jhaddock »

I am in the process of integrating the Dialogue Manager into some cutscenes using Timeline, and I was curious to get some other folk's insight as to the best way to handle this.

Essentially, I want other Timeline actions to occur, then have the Dialogue triggered and allow it to advance at the player's speed (i.e, press continue), and then when the dialogue is complete to resume the Timeline.

Looking through the documentation, the Timeline(pause) and Timeline(play) sequence commands won't work here as it restarts the Timeline. The Timeline(speed) sequence does not appear to work for me here either, as the playback is not resuming. Additionally, with the sequence commands, is there a way to set it to occur only after the player hits continue to end the conversation?

Alternatively, if there is a better way to drive all of this, I'm open to suggestions there as well! Thanks!
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Best Practice for Timeline Control?

Post by Tony Li »

Hi,

There are two ways to approach it:

1. Allow the conversation to control the flow, using the Timeline() sequencer command to invoke a separate timeline for each dialogue entry node or pause a single timeline using the Timeline() sequencer command's speed parameter (in which case we'll want to investigate why the speed parameter isn't working for you.) This approach is easiest from a conversation-writing perspective.

2. Or allow the timeline to control the flow. Run a single timeline that uses a Start Conversation clip to start a conversation. Each dialogue entry node can use the Timeline() sequencer command's speed parameter to pause and resume the timeline, or you can use Continue Conversation clips to advance the conversation. Alternatively, you can leave dialogue entry nodes unconnected and use a new Start Conversation clip to show each one. This approach is usually easiest from a timeline-editing perspective.
jhaddock
Posts: 7
Joined: Mon Sep 13, 2021 2:56 pm

Re: Best Practice for Timeline Control?

Post by jhaddock »

Yes, it seemed from a flow standpoint using the sequencer commands would make the most sense, but would just need to resolve what I'm doing wrong with the resume part.

Image

And then for the last entry in the conversation, I have this:

Image

So, at the moment, that doesn't seem to do anything. Optimally I would also like to have it trigger when the player "continues" from that passage, ending the dialogue, rather than with the specific 2-second timing.
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Best Practice for Timeline Control?

Post by Tony Li »

Omit the square brackets:

Code: Select all

Timeline(speed, Opening Sequence, 0)
Square brackets are a typographical convention that indicate that a parameter is optional.
jhaddock
Posts: 7
Joined: Mon Sep 13, 2021 2:56 pm

Re: Best Practice for Timeline Control?

Post by jhaddock »

Hahah, well, that would certainly do it! As usual, we can chalk that up to user error...
Post Reply