How to make animation length variable

Hiya!

I had an animation whose perceptual tweaks I’ve worked out exactly as I want them. The only issue is now, I have to make the animation run with the same effect but take different amounts of time to execute. I can achieve this using by adjusting the speeds at which the stimulus moves but is there anything built into PsychoPy that can acheive the effect?

Do you mean like (in Each Frame)

if t > animationLength:
     continueRoutine = False