How can I call the "is_playing" function for an animated_sprite2d?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Luke Fenstad

I’m trying to detect that an animation is playing on my sprites, but anytime I try running the game, it immediately crashes and says "Invalid call to function ‘is_playing’. Does anyone know how I could fix this?

Here’s the code I have for it right now

	if skull.is_playing("Jump") == true:
	skull.set_offset(Vector2(0,-8))
if torso.is_playing("Jump") == true:
	torso.set_offset(Vector2(0,-8))
if legs.is_playing("Jump") == true:
	legs.set_offset(Vector2(0,-8))

if skull.is_playing("Jump") == false:
	skull.set_offset(Vector2(0,0))
if torso.is_playing("Jump") == false:
	torso.set_offset(Vector2(0,0))
if legs.is_playing("Jump") == false:
	legs.set_offset(Vector2(0,0))
:bust_in_silhouette: Reply From: jgodfrey

As documented, the is_playing() method does not take any arguments. It simply returns true/false indicating whether an animation is currently playing.

You can use the animation property to get the name of the current animation.