Page 1 of 1

Sequencer timeline command destroys timeline under some conditions

Posted: Sun Dec 10, 2017 5:31 pm
by Enlil
Hello,
I was playing with integrating the dialogue system and timeline, and found something a bit odd - if I put in a sequencer command of Timeline(play, <gameobject name>, nowait), it destroys the GameObject holding the timeline director.

The intent was to create a generic bit of talking animation and use nowait to allow for different length speechs (using Delay({{end}}) to cause the timeline to stop when the subtitles were done). I made a project with just dialogue system and the character standard asset pack to try to be sure there was nothing else interfering. I would be happy to provide it if you think it would help.

Does this seem like a reasonable strategy if the timeline gameobject didn't get destroyed?

Thanks,
Christian

Re: Sequencer timeline command destroys timeline under some conditions

Posted: Sun Dec 10, 2017 5:51 pm
by Tony Li
Hi Christian,

The GameObject destruction is a bug. It's fixed in the upcoming version 1.7.7. You can download the fix here, too:

TimelineSequencerCommand_20171210.unitypackage

With the fix, your strategy should work fine. You'll want to use Timeline(stop,...) to stop the timeline at {{end}}, such as:

Code: Select all

Timeline(play, speaker, nowait);
required Timeline(stop, speaker)@{{end}}
(The "required" keyword ensures that the timeline stops even if the player cancels the line early.)

Re: Sequencer timeline command destroys timeline under some conditions

Posted: Sun Dec 10, 2017 6:20 pm
by Enlil
Awesome! Great to hear the bug is fixed in a future version. And great to see the extra bit of script that forces the stop if the the user cancels early. I am still getting my head around lua generally and the dialogue system generally, and would not have figured that out for a long time if ever.

Thanks!
Christian

Re: Sequencer timeline command destroys timeline under some conditions

Posted: Sun Dec 10, 2017 8:05 pm
by Tony Li
Glad to help!