Quantcast
Viewing all articles
Browse latest Browse all 88

Answer by Dee Va

hmm.... i have finded myself :D patrol function added in the top function Update and that worked fine :D function Update () { if(Health <= -100.05){ Destroy(gameObject); Instantiate(DeadReplacement,Soldier.transform.position,Soldier.transform.rotation); } if(Vector3.Distance(transform.position,target.position) > Patrol){ GetComponent(NavMeshAgent).enabled = true; Soldier.animation.CrossFade("RelaxedWalk"); AttackRange.enabled = false; }

Viewing all articles
Browse latest Browse all 88

Trending Articles