Using sequence field to play timeline

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
lostmushroom
Posts: 195
Joined: Mon Jul 01, 2019 1:21 pm

Using sequence field to play timeline

Post by lostmushroom »

Hey Tony. This is an issue I had a while back that I don't think I ever figured out. I'm having difficulty getting a timeline to play using the sequence field on a dialogue node. I reach that node and the timeline just doesn't play.

The dialogue node's sequence field has the following:
Timeline(play, Cutscene_Chess);
Continue();

I set debug level to info and get this: Sequencer: Timeline(play, Cutscene_Chess).

The timeline object (Cutscene_Chess) has Play On Awake unchecked, if that possibly has anything to do with it?

Nothing is happening in the timeline window either. The timeline works when triggered manually or when Play On Awake is checked, so I don't think there's anything else wrong with it.
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Using sequence field to play timeline

Post by Tony Li »

Hi,

By default, the Timeline() command stops the timeline when the dialogue entry ends.

If you want to stay on the same dialogue entry until the timeline has finished, try:

Code: Select all

Timeline(play, Cutscene_Chess)->Message(Done);
Continue()@Message(Done)
If you want the timeline to play in the background while the conversation advances to the next dialogue entry:

Code: Select all

required Timeline(play, Cutscene_Chess, nostop);
Continue();
(The 'required' keyword guarantees that the Timeline() command will get a chance to run. Since neither command has '@' timing information, they'll both go into the queue to run. If the Continue() command happens to run first, without 'required' the Timeline() command wouldn't run.)
lostmushroom
Posts: 195
Joined: Mon Jul 01, 2019 1:21 pm

Re: Using sequence field to play timeline

Post by lostmushroom »

Thanks so much Tony, it's working now!
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Using sequence field to play timeline

Post by Tony Li »

Glad to help!
lostmushroom
Posts: 195
Joined: Mon Jul 01, 2019 1:21 pm

Re: Using sequence field to play timeline

Post by lostmushroom »

One more question on a similar topic. I'm using a conversation track to start a conversation in the timeline. Is it possible to have the timeline pause for the duration of the conversation, then resume playing once it's over?

Basically I'm setting up short interactive cutscenes and I'd rather have one timeline taking care of the whole thing instead of splitting it into two "StartCutscene" and "EndCutscene" timelines, so just wanted to check if this was possible.
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Using sequence field to play timeline

Post by Tony Li »

Hi,

Yes. At the beginning of the conversation, set the timeline's speed to zero. At the end, set it back to 1. You can use Timeline() commands in your conversation for this.
lostmushroom
Posts: 195
Joined: Mon Jul 01, 2019 1:21 pm

Re: Using sequence field to play timeline

Post by lostmushroom »

Thanks, that's working now too.

I only have one issue now which might be more Corgi related than DS, but I'm wondering if it's something to do with DS disabling character movement during conversation.

I'm using the timeline to disable the player and replace it with an actor for the cutscene, then enable it again. When the player is enabled again, the horizontal movement ability is unchecked, so the player can't move. Even after manually checking it in the inspector, the player still won't move, which seems weird. Do you know what might be going on here?
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Using sequence field to play timeline

Post by Tony Li »

Hi,

Make sure the original Corgi player is present and active when you end the conversation. The Conversation Zone component waits 1 frame and then calls UndoDisallowMovement(), which in turn calls player.GetComponent<CharacterHorizontalMovement>().MovementForbidden = false;

It's possible that this code isn't being called on the player, which leaves the MovementForbidden value set to true.
lostmushroom
Posts: 195
Joined: Mon Jul 01, 2019 1:21 pm

Re: Using sequence field to play timeline

Post by lostmushroom »

Hey Tony, that was it. Thanks for all your help, everything seems to be working as intended now (:
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Using sequence field to play timeline

Post by Tony Li »

Glad to help!
Post Reply