when the AnimatedSprite move its only playing one frame.I Make all frames and make a looooooooong scripts but its only works one frame i recheck but it doesn't so any solution?
this is a top down game
Here my script,
` extends KinematicBody2D
export (int) var speed = 200
var velocity = Vector2()
func getinput():
velocity = Vector2()
if Input.isactionpressed("uiright"):
velocity.x += 1
$AnimatedSprite.play("Runside")
else:
$AnimatedSprite.play("Idle")
if Input.isactionpressed('uileft'):
velocity.x -= 1
$AnimatedSprite.play("Runside")
if Input.isactionpressed('uidown'):
velocity.y += 1
$AnimatedSprite.play("rundown")
if Input.isactionpressed('ui_up'):
velocity.y -= 1
$AnimatedSprite.play("Runup")
velocity = velocity.normalized() * speed
func physicsprocess(delta):
getinput()
velocity = moveand_slide(velocity)`
note:I am a total noob at scripting and making games pls help
Edit:sorry p7f i cannot see a button in tool but i see {} which make no sense