Hi, I'm totally new to coding and making games. I'm working on a skateboard game in 2d.
I am using the Animated Sprite. I need a way to have an idle animation that plays, and then use inputs to trigger trick animations. The trick animations need to hide when they reach the final frame, and reset to frame 0 so that they play from the beginning when they're called next.
I am trying to do something like this, but I am getting an error message that my last line of code is using an unexpected assign. That's confusing because I am using the same command a few lines above, and that instance has no errors:
if Input.is_action_pressed("ui_Kickflip"):
$Rolling.hide()
$Kickflip.frame = 0
$Kickflip.show()
$Kickflip.playing = true
if $Kickflip.frame = 26
$Kickflip.hide()
$Rolling.show()