This script is on my player, it detects a tag for the shotgun. Some reason when my player collides with the tag it does not set to true ? Any help would be appreciated, thank you. Code (CSharp): public class Shotgun : MonoBehaviour { Animator animator; public bool shotgun; void Start () { animator = GetComponent<Animator> (); //animator.SetBool ("Shotgun", true); } void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Boomstick") { animator.SetBool ("Shotgun", true); } } }
My bad i did not look in animator while running my game. It`s setting the bool to true, but sends my Walk animation in a constant loop o_0 Any ideas what i should do. *Update. In my walk cycle i had shotgun false when walking. I deleted them, now it works. fine. Sorry