Adjust Timeline based on position

Hi Guys

I need help again please, the current project i'm trying to show which runner is in front.

I have created a timeline which follows the track image, if i know what the meters to finish is how would i be able to place either runner 1 or 2 ahead?

tracking.zip (362.7 KB)

I assume you mean you know for each runner.

Firstly you would need to put each runner on its own timeline. ( Just duplicate the timeline and then on each timeline remover the animation for the other runners)

This allows you to control each runner independently.

Also can I suggest when you post your examples you post the bear bones that's needed to show what you are doing/trying to do. . i.e remover any code and elements that is not needed for us to get an understanding. Code that is running for example on scene load but not needed in a bear bones example muddies the waters.

More info is probably needed to go further on..

i.e how often is this being updated, how and what does this data look like.

But I suspect to control the timelines you will need to do so using a similar method to the below.

( not sprites but the coding idea of requestAnimationFrame() and/or setTimeout(function() )

plus @h_classen code idea in this but not in reverse.

A quick and dirty example.

trackingMHv1.hype.zip (61.2 KB)

In the example I only add to the current time to cause speed changes.
But you could also use the timeout speed to do the same or a combination of both.

Hi Mark

Thank you once again for assisting me, i will use your example going forward.
And i will make sure the next project would only have the code in based on what i'm struggling with.

Just FYI this link not working anymore: https://forums.tumult.com/t/modify-duration-of-timeline-when-played-in-reverse-using-javascript/8672