Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Problem with multiple animation Controlle Script

$
0
0
Hello guys, I have problem when playing animatons when I press a joystick button, only the two first animations work, but the 2 last are not working if(Input.GetButtonDown("Fire1")){ // Instantiate(AttackEffect, transform.position, transform.rotation); //animation.Play("gogo_fire"); // audio.PlayOneShot(AttackSound); _animation.CrossFade(Sword_Anim.name); walkSpeed = 1.0; trotSpeed = 1.0; } if(Input.GetButtonUp("Fire1")){ walkSpeed = 14.0; trotSpeed = 16.0; } if(Input.GetButtonDown("Fire2")){ // Instantiate(AttackEffect, transform.position, transform.rotation); //animation.Play("gogo_fire"); // audio.PlayOneShot(AttackSound); _animation.CrossFade(Sword_Anim2.name); } if(Input.GetButtonDown("Fire3")){ // Instantiate(AttackEffect, transform.position, transform.rotation); //animation.Play("gogo_fire"); // audio.PlayOneShot(AttackSound); _animation.CrossFade(Sword_Anim3.name); //animation.Blend("gogo_sword2"); } if(Input.GetButtonDown("FireJoy")){ // Instantiate(AttackEffect, transform.position, transform.rotation); //animation.Play("gogo_fire"); // audio.PlayOneShot(AttackSound); _animation.CrossFade(Sword_Anim4.name); } Please help :'(

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>