Hi, all! I was wondering if there was an efficient way to make a one-framed animation play at the beginning, and another after colliding with a kinematic body 2D (The animated sprite is on an Area2D)? I originally had both frames in their own animations, but neither of them worked. I then wondered if I should put them in one animation, and just have the animation run to switch the frame. Another thought was to have two completely different sprites, and destroy the unnecessary one after the collision.
So far, I'm testing working with one animation and two frames. None of the codes I've tried even changes the frame- it's stuck on the first one. Here's the code so far.
export var connected = false
# Called when the node enters the scene tree for the first time.
$AnimatedSprite.animation = "switch"
# Called every frame. 'delta' is the elapsed time since the previous frame.
$AnimatedSprite.animation = "on"
connected = true