Using sequence field to play timeline
-
- Posts: 188
- Joined: Mon Jul 01, 2019 1:21 pm
Using sequence field to play timeline
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.
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
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:
If you want the timeline to play in the background while the conversation advances to the next dialogue entry:
(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.)
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)
Code: Select all
required Timeline(play, Cutscene_Chess, nostop);
Continue();
-
- Posts: 188
- Joined: Mon Jul 01, 2019 1:21 pm
Re: Using sequence field to play timeline
Thanks so much Tony, it's working now!
Re: Using sequence field to play timeline
Glad to help!
-
- Posts: 188
- Joined: Mon Jul 01, 2019 1:21 pm
Re: Using sequence field to play timeline
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.
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
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.
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.
-
- Posts: 188
- Joined: Mon Jul 01, 2019 1:21 pm
Re: Using sequence field to play timeline
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?
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
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.
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.
-
- Posts: 188
- Joined: Mon Jul 01, 2019 1:21 pm
Re: Using sequence field to play timeline
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
Glad to help!