Sequencer timeline command destroys timeline under some conditions

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Enlil
Posts: 2
Joined: Sun Dec 10, 2017 5:21 pm

Sequencer timeline command destroys timeline under some conditions

Post 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
User avatar
Tony Li
Posts: 22061
Joined: Thu Jul 18, 2013 1:27 pm

Re: Sequencer timeline command destroys timeline under some conditions

Post 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.)
Enlil
Posts: 2
Joined: Sun Dec 10, 2017 5:21 pm

Re: Sequencer timeline command destroys timeline under some conditions

Post 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
User avatar
Tony Li
Posts: 22061
Joined: Thu Jul 18, 2013 1:27 pm

Re: Sequencer timeline command destroys timeline under some conditions

Post by Tony Li »

Glad to help!
Post Reply