How to start timeline sequence after conversation has ended

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
PepeJEe
Posts: 18
Joined: Sat Apr 24, 2021 8:39 am

How to start timeline sequence after conversation has ended

Post by PepeJEe »

Hello :)
How can I start a timeline sequence after i finish a conversation?
-Pepe
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to start timeline sequence after conversation has ended

Post 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.
Post Reply