![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Dumuz |
I just want to stop my tween, but it’s not working!
func _process(delta):
var distance2opponent = self.transform.origin.distance_to(get_node("../Player").global_transform.origin)
if distance2opponent < 5 and $Tween2.is_active():
$Tween2.stop()
This gives me this Error:
Invalid type in function ‘stop’ in base ‘Tween’. Cannot convert argument 1 from int to Object.
But if I put say: $Tween2.stop(Tween)
it does absolutely nothing.
PLEASE someone help, I’v been stuck on this problem for 2 days and I don’t know what bool stop ( Object object, String key=”” ) is, as stated in the Godot docs. I don’t know what a “key” is. I’ve searched online and I can’t find anyone doing anything with tweens besides creating them. PLEASE HELP.