0 votes

Hi All --

I am looking for the easiest/recommended way to check if a tween has completed playing, and if it has not, stop it and play another tween. This is what i'm after:

if not tween_A.completed:
    tween_A.stop()
    tween_B.start()
else: tween_B.start()
in Engine by (422 points)

1 Answer

0 votes

A Tween has a tween_completed signal and a tween_all_completed signal that might be helpful. Otherwise, maybe you want the tween's is_active() method?

Docs here:

https://docs.godotengine.org/en/stable/classes/class_tween.html?highlight=tween#class-tween-method-is-active

by (10,914 points)
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.