- Home /
 
 
               Question by 
               Davidflynn · Mar 09, 2012 at 02:10 PM · 
                attack  
              
 
              attack in 3rd person controller
I am working with unitys 3rd person controller and I am a little new to working with combat what would I have to do to make it so that the script they have on it makes it play the attack animation when I press the "A" button?
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Berenger · Mar 09, 2012 at 03:50 PM
Create the attack animation, name it attack. Then add this code in update
 if( Input.GetKeyUp( KeyCode.A ) )
     animation.Play("attack");
 
              Your answer
 
             Follow this Question
Related Questions
Seting Fire Up as a attack 1 Answer
Send hero to attack builds (js) 0 Answers
collider affect collider problem 0 Answers
Zombie script 1 Answer
How do you script combo attacks? 2 Answers