Update: Still can't figure out the animation thing
So a while ago I asked for help changing the sprite whenever the player turns a specific direction. I got a lot of replies telling me to do different things and code and stuff, but none of them worked when I tried them. I'm not sure exactly how to go about this from here.
If you are having a hard time with direction. Use this: https://microstudio.dev/i/Vafis/basicdiagonalmovement/
Create different sprites for different animations and use a variable to store the animation:
init = function()
player = object
animation = "idle"
end
end
update = function()
player.animation = "idle"
if keyboard.LEFT then
player.animation = "left"
end
if keyboard.RIGHT then
player.animation = "right"
end
end
draw = function()
// sprites in player folder are idle, left, and right
screen.drawSprite("player/" + player.animation, 0, 0, 16, 16)
end