Timeline() Sequencer command issues

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
NoctisFatehart
Posts: 3
Joined: Mon Jun 25, 2018 6:27 pm

Timeline() Sequencer command issues

Post by NoctisFatehart »

Hello, I’ve been using the Dialogue System for a while and it’s been great so far! Just recently, however, I decided to try out some of the timeline functionality to see if I’d want to use the two in conjunction in my project.

In trying them, I’ve run into a couple warnings and some issues trying to use the sequencer command for l timeline within the dialogue system that I hope I can get some help with.

First off, I’m not sure if I’m just reading incorrectly or I wrote it incorrectly but for some reason the sequencer command syntax on the Dialogue System’s documentation seems to be different than what I’m getting in the actual project. I the documentation it read that I’d put the Mode first and then the name of the GameObject with the playable director on it.

However, in my project during runtime, the sequencer command gives me a warning saying that the first option can not be found as the playable director(in this case it used the mode name as the gameobject)

My second issue involves the same warning I mentioned prior, after switching around the mode and playable name in the command. Despite the playable gameobject being in the scene and active, I receive the “playable director cannot be found” warning no matter what.

Hopefully I’m just an idiot and I’m missing something incredibly obvious, but I’ve been unable to figure out how to fix these issues. Any help would be appreciated!

Thank you!
User avatar
Tony Li
Posts: 22058
Joined: Thu Jul 18, 2013 1:27 pm

Re: Timeline() Sequencer command issues

Post by Tony Li »

Hi,

Would you please reply with the sequencer command that you're using? It's probably just a minor syntax issue that we can clear up. It should be mode first, then the Playable Director GameObject name second.

For example, say you have a Playable Director on a GameObject named "Interactable Doors". This sequencer command will play it:

Code: Select all

Timeline(play,Interactable Doors)
NoctisFatehart
Posts: 3
Joined: Mon Jun 25, 2018 6:27 pm

Re: Timeline() Sequencer command issues

Post by NoctisFatehart »

Sure!

It was:

Timeline(pause, Test01);

Which resulted in the “Can’t find a playable director with the name ‘pause’”

Then subsequently tried:

Timeline(Test01, pause);

which apparently was unable to find the Gameobject of the same name.

Test01 being the name of the object.

I also used:

Timeline(resume, Test01);

gave the same results as above.

And tried:

Timeline(Test01, resume);

None of these worked, so I hope I’m just missing something.
User avatar
Tony Li
Posts: 22058
Joined: Thu Jul 18, 2013 1:27 pm

Re: Timeline() Sequencer command issues

Post by Tony Li »

The mode definitely needs to come first. Here's an example scene: TestTimeline_2018-06-26.unitypackage

It plays the timeline in a Sequence Trigger on a GameObject named Interactable Doors. But the same applies if you're using the Timeline command in a conversation's Sequence field.

The sequence is:

Code: Select all

Timeline(play, Interactable Doors, nowait, nostop);
Timeline(pause, Interactable Doors, nowait, nostop)@2;
Timeline(resume, Interactable Doors, nowait, nostop)@4
(I'll explain nowait and nostop in a bit.)

If you inspect the Interactable Doors GameObject with the Timeline window open and play the scene, you'll see that the timeline scrubber plays forward to 2 seconds. Then it pauses for another 2 seconds before resuming.

I probably went overboard with all the nowait and nostop keywords, but you will need some. The 'nowait' keyword tells the Timeline command that it doesn't need to wait until the timeline is done. The 'nostop' keyword tells the command that it doesn't need to set a timer to manually stop the timeline. A minimum set of keywords for the example is:

Code: Select all

Timeline(play, Interactable Doors, , nostop);
Timeline(pause, Interactable Doors)@2;
Timeline(resume, Interactable Doors, , nostop)@4
This tells 'play' and 'resume' that they don't need to set a timer to manually stop the timeline since it will be paused for some amount of time.

The whole 'nowait' and 'nostop' thing is more of a side note, though. The command shouldn't be giving you that error message in the first place. Try setting the Dialogue Manager's Other Settings > Debug Level to Info. Then play and reproduce the error. Among all the info in the Console window, you should see a line similar to this:

Code: Select all

Dialogue System: Sequencer.Play( Timeline(play, Interactable Doors, nowait, nostop)@0 )
This is the command as the Dialogue System's text parser sees it.

Later on, you should see a line similar to this:

Code: Select all

Dialogue System: Sequencer: Timeline(play,Interactable Doors,nowait,nostop)
This indicates the GameObjects and keywords that the Timeline sequencer command is actually using.

However, in your case you're getting an error message instead.

Does the first line look correct at least?

Also, what version of Unity are you using?
NoctisFatehart
Posts: 3
Joined: Mon Jun 25, 2018 6:27 pm

Re: Timeline() Sequencer command issues

Post by NoctisFatehart »

Hmm, perhaps I really missed something or switching the debug mode did something, but it actually works perfectly fine now! I'm not sure what the issue was, but I seem unable to replicate it again and pausing/resuming also seem to working just fine.

I must have overlooked something last I checked, I apologize for having had wasted your time...Thank you so much for the help, regardless! I appreciate it a lot!
User avatar
Tony Li
Posts: 22058
Joined: Thu Jul 18, 2013 1:27 pm

Re: Timeline() Sequencer command issues

Post by Tony Li »

Glad to help! Maybe there was an extra comma somewhere or something. Anyway, I'm glad it's working now!
Post Reply