If you are using an
AnimationPlayer to change the frame of a
Sprite, you can easily check which frame the
Sprite is on using its
if anim_player.current_animation == "fire" and sprite.frame in [4, 5]:
# do something
This is probably easier than building function calls into your animations to change bools.