Hi.
So basically I have a 2D kinematic character as the "playable" character in my game, and I want a different animation for left/right/down/up and idle. I have made all the animations as children of the "frames" resource (as labeled in the animated sprite properties).
So my question is, how do I change or "set" the animation? I've used the play command, which does nothing, I've used the set animation command which also does nothing, no matter what I do the animation doesn't change, it just sticks with whichever animation was initially chosen as default in the properties - its as if it ignores the scripting.
func get_input():
if Input.is_action_pressed('right'):
set_animation("frames/player_move_right")
if Input.is_action_pressed('left'):
set_animation("player_move_left")
if Input.is_action_pressed('down'):
set_animation("player_move_down")
if Input.is_action_pressed('up'):
set_animation("player_move_up")
I've done the same thing with phsyics(delta) to try and update the animation, and I've used the play("animation") command as well, neither of which work.
If there's a way to import a sprite sheet like every other engine that I don't know about, please tell me.
If there's another way to do this entirely, then that is fine as well.
Thanks for any and all feedback.