Page 1 of 1

How to start timeline sequence after conversation has ended

Posted: Sun Mar 20, 2022 5:50 pm
by PepeJEe
Hello :)
How can I start a timeline sequence after i finish a conversation?
-Pepe

Re: How to start timeline sequence after conversation has ended

Posted: Sun Mar 20, 2022 8:01 pm
by Tony Li
Hi Pepe,

You can start it at the end of the final dialogue entry node. Use the Timeline() sequencer command with the nowait and nostop keywords. For example, to play the timeline on the GameObject "MyTimelineObj", use:

Code: Select all

Timeline(play, MyTimelineObj, nowait, nostop)
If you require the player to click a continue button, use this Sequence:

Code: Select all

required Timeline(play, MyTimelineObj, nowait, nostop)@Message(Continue)
If you don't require continue button clicks, use a Sequence like:

Code: Select all

Timeline(play, MyTimelineObj, nowait, nostop)@{{end}}
Alternatively, you can add another Dialogue System Trigger component to either conversation participant's GameObject. Set it to OnConversationEnd. Then select Add Action > Play Sequence and enter the first sequence above, or select Add Action > OnExecute() UnityEvent and configure the UnityEvent to start the timeline.