In Godot how can I make the animation wait a bit?
func Damage_animation() -> void:
sprite.modulate = Color(1, 0.3, 0.3, 0.6)
await get_tree().create_timer(2)
sprite.modulate = Color(1, 1, 1, 1)
This function is called when a bullet hits a zombie. And when Damage_animation is called, I want to lower the opacity of the zombie, like a hitting animation. How can I add that feature, the current one happens instantly, which is not seenable. Anyone can help?