Hi! I'm doing a 2D fighting game from 3 years ago. Last weekend I make the decission of porting it from Godot 3.5 to 4.2.
I solved some issues but there's one that I can't realize how to overcome.
My code is full of tweens making characters make moves like jumps, dashes, special moves or parables. When in 3.5 tweens were a node, was easy to cancel a tween doing the parable of jump when the character was attacked on air, and order the tween to do the backward fallbak movement.
But now in 4.2, if every tween is created and isolated inside a method, I don't figure how to find if there is an active one and kill it (or other action) consequently from another method.

I'm pretty sure there is a solution for this. Someone can help me a bit please? Thanks in advance!

Thanks for your reply, but I did some investigation and I cannot see how to set up what you intended to explain me.

But, after a little testing, I think I can use a single global var tween and turn it null after the tween has finished. If I want to check if is still running I can check "if tween" or "if tween.is_running()" and then pause, resume or stop it.

However, Im curious about that idea of keeping track of tweens with Arrays, Dictionarys or classes. If you don't mind of giving me more details... I have only programmed with GDScript and for the last three years. There's a lot I don't know.

Thanks in any case.

    DanySnowyman keeping track of tweens with Arrays, Dictionarys or classes

    You could create a global:
    var tweens: Array[Tween]

    And append created Tweens to the Array:

    var tween: Tween = create_tween()
    Global.tweens.append(tween)
    tween.tween_property(infobox, "modulate:a", 0.0, 1.0)

    I haven't had a reason to do this, but you asked about it.

    I see. It may be useful to me in the future. Thanks again Dave.