Page 1 of 1

Using sequence field to play timeline

Posted: Thu Apr 18, 2024 10:01 am
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.

Re: Using sequence field to play timeline

Posted: Thu Apr 18, 2024 11:32 am
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.)

Re: Using sequence field to play timeline

Posted: Thu Apr 18, 2024 11:36 am
by lostmushroom
Thanks so much Tony, it's working now!

Re: Using sequence field to play timeline

Posted: Thu Apr 18, 2024 11:41 am
by Tony Li
Glad to help!

Re: Using sequence field to play timeline

Posted: Thu Apr 18, 2024 11:44 am
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.

Re: Using sequence field to play timeline

Posted: Thu Apr 18, 2024 12:11 pm
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.

Re: Using sequence field to play timeline

Posted: Thu Apr 18, 2024 12:30 pm
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?

Re: Using sequence field to play timeline

Posted: Thu Apr 18, 2024 4:34 pm
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.

Re: Using sequence field to play timeline

Posted: Fri Apr 19, 2024 8:05 am
by lostmushroom
Hey Tony, that was it. Thanks for all your help, everything seems to be working as intended now (:

Re: Using sequence field to play timeline

Posted: Fri Apr 19, 2024 8:39 am
by Tony Li
Glad to help!