title: Love2D Animation Error
body: <p>I am having an annoying bug with my character movement animations. That bug is, that whenever I run the code, the animation only works for the 'W' key. (The movement is WASD.) I don't get any compilation errors and I am using Love2D 0.10.1</p>
  
  <p>Here is the movement handler function</p>
  
  <pre><code>   function player.move(dt)
         if love.keyboard.isDown("d") and
         player.xvel &lt; player.speed then
            player.xvel = player.xvel + player.speed * dt
            player.image = love.graphics.newImage("images/player/walk1.png")
         else
            player.image = love.graphics.newImage("images/player/static.png")
         end
  
         if love.keyboard.isDown("a") and
         player.xvel &gt; -player.speed then
            player.xvel = player.xvel - player.speed * dt
            player.image = love.graphics.newImage("images/player/walk1.png")
         else
            player.image = love.graphics.newImage("images/player/static.png")
         end
  
         if love.keyboard.isDown("s") and
         player.yvel &lt; player.speed then
            player.yvel = player.yvel + player.speed * dt
            player.image = love.graphics.newImage("images/player/walk1.png")
         else
            player.image = love.graphics.newImage("images/player/static.png")
         end
  
         if love.keyboard.isDown("w") and
         player.yvel &gt; -player.speed then
            player.yvel = player.yvel - player.speed * dt
            player.image = love.graphics.newImage("images/player/walk1.png")
         else
            player.image = love.graphics.newImage("images/player/static.png")
         end
  
      end
  </code></pre>
  
  <p>Anything helps! Oh, and also, if anyone knows how to make it to where it goes to a certain frame every x amount of seconds, that's be great! Thanks!</p>