Timeline(speed 0) pauses timeline, but not indefinitely?
Posted: Mon Apr 10, 2023 7:34 pm
Hi Tony!
The Context:
Making a Timeline cutscene that pauses at key points before proceeding to wait for the player to proceed through dialog via continue button at their own pace.
I am nesting one timeline inside of another; The "child" timeline is played in the "parent" timeline via a Control Track.
The Child timeline has:
-2 Player Animator tracks; one to control Transform, and one to change animation clips of the player sprite.
The Parent Timeline has:
-1 Control Track for the child timeline,
-1 Start Conversation Track,
-1 Play Sequence Track
-1 SceneFader track
-1 Cinemachine track
-1 Quest State track.
I use the Play Sequence Track to use the Timeline() command to set the speed to 0 and wait for a "go" message sent by the dialogue tree conversation to set it back to 1.
The Problem:
As I was building it, I used "Play on Awake" on the PlayableDirector to trigger the timeline just to quickly test behavior and design the scene. The functionality worked great.
Then when I set up the Dialogue System Trigger to evaluate Quest Conditions (If Intro Screen quest is set to "Active") and Play Sequence (Timeline(play);), and turned off "Play on Awake", the behavior changed.
The Timeline was "pausing" indefinitely as intended, waiting for the message "go" properly- but now, for no discernible reason, the timeline will appear to "pause", but only for the amount of time until the end of the timeline, and then will "end" the timeline clip. For example; if the pause occurs and there are 2.4 seconds left at the timeline's regular play speed, once it has been paused for 2.4 seconds, it will "end" the timeline as if it had reached the end of the clip.
In other words; the Timeline appears to "stop" correctly, but some part I can not see is continuing to proceed as if the speed had not changed, but without triggering any of the other track behaviors. It's as if the Timeline is paused but it's "Timer" isn't, or something.
It took me a long time to isolate that switching from "Play On Awake" to the Dialogue System trigger was the change that altered the behavior, so my only guess is that something about the way the Play Sequence works from the trigger is different from how "play on awake" on the director works? (And indeed, when I re-set it to "play on awake", it regains it's correct functionality.)
The Context:
Making a Timeline cutscene that pauses at key points before proceeding to wait for the player to proceed through dialog via continue button at their own pace.
I am nesting one timeline inside of another; The "child" timeline is played in the "parent" timeline via a Control Track.
The Child timeline has:
-2 Player Animator tracks; one to control Transform, and one to change animation clips of the player sprite.
The Parent Timeline has:
-1 Control Track for the child timeline,
-1 Start Conversation Track,
-1 Play Sequence Track
-1 SceneFader track
-1 Cinemachine track
-1 Quest State track.
I use the Play Sequence Track to use the Timeline() command to set the speed to 0 and wait for a "go" message sent by the dialogue tree conversation to set it back to 1.
The Problem:
As I was building it, I used "Play on Awake" on the PlayableDirector to trigger the timeline just to quickly test behavior and design the scene. The functionality worked great.
Then when I set up the Dialogue System Trigger to evaluate Quest Conditions (If Intro Screen quest is set to "Active") and Play Sequence (Timeline(play);), and turned off "Play on Awake", the behavior changed.
The Timeline was "pausing" indefinitely as intended, waiting for the message "go" properly- but now, for no discernible reason, the timeline will appear to "pause", but only for the amount of time until the end of the timeline, and then will "end" the timeline clip. For example; if the pause occurs and there are 2.4 seconds left at the timeline's regular play speed, once it has been paused for 2.4 seconds, it will "end" the timeline as if it had reached the end of the clip.
In other words; the Timeline appears to "stop" correctly, but some part I can not see is continuing to proceed as if the speed had not changed, but without triggering any of the other track behaviors. It's as if the Timeline is paused but it's "Timer" isn't, or something.
It took me a long time to isolate that switching from "Play On Awake" to the Dialogue System trigger was the change that altered the behavior, so my only guess is that something about the way the Play Sequence works from the trigger is different from how "play on awake" on the director works? (And indeed, when I re-set it to "play on awake", it regains it's correct functionality.)