Timeline: Is this a bug?

0 favourites
  • 7 posts
From the Asset Store
Bug Match
$2 USD
60% off
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • Been scratching my head for a few days with this one and started to realize maybe this isn't working how I think it should. But is it a bug?

    I have a 2s time line that has a keyframe at 1 second. This keyframe has a tag of "top"

    Play Timeline with tag "boost"

    ->TimelineController: On "boost" start : Execute ACTION1

    ->TimelineController: On keyframe "top" reached : Pause "boost"

    ->On KeyReleased : Resume "boost"

    Now, what is happening is when the Resume Action is triggered, the On "boost" start EVENT is triggering again. In my mind On "boost" start what when the timeline starts from the beginning only.

    I just want to make sure this isn't a bug before moving on and fixing my code.

    Thanks.

    Tagged:

  • It's difficult to tell without looking at the project, it might be a subtle bug though.

    Looking at the code, a timeline that resumes playback from the exact same position as a keyframe, doesn't trigger the keyframe reached condition.

    I am thinking that if playback is stopped when the condition is triggered, maybe the play head does not end exactly in the position of the keyframe but just before it. If that happens then when playback is resumed, it wouldn't technically be in the same position as a keyframe so the condition might be triggered the following tick.

    That's a wild guess, I would need to look at it more closely to be sure.

  • I created a quick example project.

    Hitting start will stop the timeline and start it again.

    Resume will resume the timeline from the midway point.

    The top is a counter showing each time the ->On Started event is triggered. It is triggered when the timeline is first started and when it's resumed after being paused

    dropbox.com/scl/fi/fuio7qpn91s5azb3bqu47/timeline.c3p

    I'm thinking it's working as intended, but just not totally sure :)

    Thanks.

    It's difficult to tell without looking at the project, it might be a subtle bug though.

    Looking at the code, a timeline that resumes playback from the exact same position as a keyframe, doesn't trigger the keyframe reached condition.

    I am thinking that if playback is stopped when the condition is triggered, maybe the play head does not end exactly in the position of the keyframe but just before it. If that happens then when playback is resumed, it wouldn't technically be in the same position as a keyframe so the condition might be triggered the following tick.

    That's a wild guess, I would need to look at it more closely to be sure.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I updated the project to also show something else I noticed. When I have a flag set at 1 second on the timeline, it doesn't pause exactly at one second. This might be causing another issue I am having and was curious if there was a way around this.

    So project now shows a second number that stops when the time gets to the pause point, should be 1s and at the end which is 2s.

    The end always ends up at 2s. The 1s pause can be 1.0004 or 1.0115 or something in between. Maybe I am trying to get too precise with this :).

    It's difficult to tell without looking at the project, it might be a subtle bug though.

    Looking at the code, a timeline that resumes playback from the exact same position as a keyframe, doesn't trigger the keyframe reached condition.

    I am thinking that if playback is stopped when the condition is triggered, maybe the play head does not end exactly in the position of the keyframe but just before it. If that happens then when playback is resumed, it wouldn't technically be in the same position as a keyframe so the condition might be triggered the following tick.

    That's a wild guess, I would need to look at it more closely to be sure.

  • I have been looking at this and I realise I misunderstood your first post.

    In that case, it's working as it has always worked. The On Start trigger is executed when ever the timeline starts playing, there is no distinction between starting from the beginning or being resumed.

    I think I will add a parameter to be able to decide if it should be triggered at any time, only from resume or only from the beginning.

    Can you make that file you shared public? I would like to take a look at it.

  • I have been looking at this and I realise I misunderstood your first post.

    In that case, it's working as it has always worked. The On Start trigger is executed when ever the timeline starts playing, there is no distinction between starting from the beginning or being resumed.

    I think I will add a parameter to be able to decide if it should be triggered at any time, only from resume or only from the beginning.

    Can you make that file you shared public? I would like to take a look at it.

    It should be public, it's just on my dropbox. Will it not let you download it?

    I zipped it up and put it on my ftp.

    arcadeinabox.com/timeline.zip

    And that is excellent news. Thank you

  • Thanks for adding this to the latest beta version.

    I have been looking at this and I realise I misunderstood your first post.

    In that case, it's working as it has always worked. The On Start trigger is executed when ever the timeline starts playing, there is no distinction between starting from the beginning or being resumed.

    I think I will add a parameter to be able to decide if it should be triggered at any time, only from resume or only from the beginning.

    Can you make that file you shared public? I would like to take a look at it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)