How to play an animation after another ends?

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

Hi, I’m new at Godot -and in programming in general- and I can’t figure out how to do this, I already read the documentation and still can’t get it.

This is all I have at te moment:

extends Area2D

onready var _player = $AnimatedSprite

func _ready():
_player.play(“Idle”)

func _on_player_animation_finished():
if _player.frame == 299:
_player.play(“SitDown”)

:bust_in_silhouette: Reply From: Inces
func on_animation_player_animation_finished(animation):
       _player.play("SitDown")

that is it.
If You want to check for specific animation You can also insert
if animation == “Stand”

You did connect AnimationPlayer signal correctly, didn’t You ?