0 votes

In my project I've got two timers set at 5 and 5.2 seconds. When the first reaches zero it triggers an animation that lasts 0.2 seconds on a list of nodes, making them disappear, then the other reaches zero and changes the position of the nodes, triggering another animation to make them appear.

The problem is that, after some triggering of those timers, the second one seems to "slow down", slowly increasing the time between the nodes' disappearing and appearing. Is there a better way of obtaining what I want, or an explanation to this strange thing?

in Engine by (17 points)

1 Answer

+1 vote
Best answer

It's not strange at all. Look what's happening:

run 1 > T1 = 05s, T2 = 5.2s
run 2 > T1 = 10s, T2 = 10.4s
run 3 > T1 = 15s, T2 = 15.6s

See? The distance between them is getting larger, and this is because of how you set it up. You want 0.2s after Timer 1 ends, not 5.2s after Timer 1 begins.

What you need to do is set Timer 1 with 5s and Timer 2 with 0.2s. Then, when Timer 1 times out, start Timer 2.

by (1,091 points)
selected by

Thank you! Silly me

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.