title: How to make animation play on key press w, a, s, and/or d and stop when none of those are being pressed?
body: <p>I made a humanoid model and a walk animation for him using maya (exported as fbx). I can make the animation play indefinitely, but I want it to only play when w, a, s, or d are pressed down. Then I want it to stop when the key(s) are released.</p>
  
  <p>I have my animation script attached to my player object. I also have an animation component that contains my "Player_Walk" animation, which is attached to my player object. Is there some other component I need to get for it to work correctly? or initialize something in the script? or?</p>
  
  <p>Here is my script:
  <a href="https://i.stack.imgur.com/KdGUf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KdGUf.png" alt="enter image description here"></a></p>
  
  <p>Thanks for the help in advance! If more info is needed, let me know.</p>
  
  <p>P.S. There are other questions like this, but a lot of them and their answers were before Unity 5 was released, hence they are not very helpful.</p>