0 votes

My animation for my range attack was so long that the projectile already travel before the animation ends i don't know how to disable and able the position 2d and how to use a timer

in Engine by (29 points)

1 Answer

0 votes

As you haven't specified which node you use for the animation, I'll simply assume an AnimatedSprite. it works similar for an AnimationPlayer-node though.

$AnimatedSprite.play("default")
yield($AnimatedSprite, "animation_finished")
# and THEN you spawn the projectile
by (10,327 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.