I'm trying to make a simple enemy that sits in an idle animation and shoots every so often. It's supposed to play a firing animation when the timer goes off then revert to its idle until the timer goes off again.
What actually happens is it will cycle through once back to the default animation then get stuck. I'm still new, if there's a better way to go about this I'd be happy to hear it. Thanks!
if can_shoot == true:
$AnimatedSprite.connect("animation_finished", self, "_on_firing_animation_finished")
emit_signal('shoot', Bullet, $Position2D.global_position)
can_shoot = false
can_shoot = true