- Home /
Question by
TheUnkn0wn115 · Feb 28, 2013 at 06:57 PM ·
animationfpsweapon
problem with weapon animation -.-
hello, i want my weapon animation play when i press "w,a,s,d" and stop the animation if the buttons are not pressed and im noob on scripting so if anyone could help me :)
function Update () { if(Input.GetButtonDown("Vertical")) animation.Play("walk");
if(Input.GetButtonDown("Horizontal"))
animation.Play("walk");
if(Input.GetButtonUp("Vertical"))
animation.Stop("walk");
if(Input.GetButtonUp("Horizontal"))
animation.Stop("walk");
}
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Multiple Weapon Animation Help 0 Answers
Why won't it run 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Weapon reloading while running!!! 1 Answer