Hi guys
I have the exact same function working on one gameobject that shoots in the direction of the player.
But the same function on another object it doesnt seem to work properly, if anybody could give me an idea why it would be great.
Same function not working the same in different script
I have the exact same function working on one gameobject that shoots in the direction of the player.
But the same function on another object it doesnt seem to work properly, if anybody could give me an idea why it would be great.
Code (CSharp):
- if (dist < randomDistance && isAlive && playerScript.isAlive)
- {
- followingPlayer = true;
- if (Time.time > lastTimeShot + shootingDelay && playerScript.isAlive)
- {
- lastTimeShot =...