Page 1 of 1

Pause Timeline Until Continue Button Pressed

Posted: Sat Feb 05, 2022 6:31 pm
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?

Re: Pause Timeline Until Continue Button Pressed

Posted: Sat Feb 05, 2022 8:25 pm
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)

Re: Pause Timeline Until Continue Button Pressed

Posted: Sat Feb 05, 2022 8:53 pm
by PayasoPrince
That is so cool!

You da man Tony 8-)

Re: Pause Timeline Until Continue Button Pressed

Posted: Sat Feb 05, 2022 9:49 pm
by Tony Li
Happy to help!