Pause Timeline Until Continue Button Pressed

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
PayasoPrince
Posts: 104
Joined: Thu Jan 27, 2022 6:47 pm

Pause Timeline Until Continue Button Pressed

Post by PayasoPrince »

Hello,

I am working on incorporating The Dialogue System Into Timeline.

I have a StartConversationClip that occurs before activating a camera and starting a new conversationclip. What I'd like to do is wait until the player presses the continue button before the Timeline continues and activates the camera and starts a new conversationclip.

Is there anyway to wait for player input to continue?
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Pause Timeline Until Continue Button Pressed

Post by Tony Li »

Hi,

Yes. Set the timeline's speed to zero when showing the subtitle. Set it back to one when the player clicks the continue button.

You can either do this in code or in a Sequence. For example, say the timeline is on a PlayableDirector GameObject named "MyCutscene1". You could set the conversation's Default Sequence to something like:

Code: Select all

Timeline(speed, MyCutscene1, 0);
required Timeline(speed, MyCutscene1, 1)@Message(Continued)
User avatar
PayasoPrince
Posts: 104
Joined: Thu Jan 27, 2022 6:47 pm

Re: Pause Timeline Until Continue Button Pressed

Post by PayasoPrince »

That is so cool!

You da man Tony 8-)
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Pause Timeline Until Continue Button Pressed

Post by Tony Li »

Happy to help!
Post Reply