Turret AI Script - one way detection
Hi,
I am new to Unity, and I would like to create a simple enemy turret. The turret will be stationary, firing at one side ONLY (for example left, the turret will NOT be rotating). I have applied the necessary colliders that would serve as detection colliders, and a firing point.
What I would like to achieve is: - The turret will be facing one side - The turret will fire bullet at 2 second interval, with a 50hp damage upon hit and bullet speed of 100 - Turret will not have any HP - Fires bullet only when the player enters the detection zone - Shooting animation plays only when the shot is fired
If you require any script of my player, or anything else, write below and I will provide it ASAP.
Any help would or advice will be appreciated.
The problem is, that I don't know how to start. I don't know what the script has to contain.
create a coroutine thats instantiates the bullets every 2 second with a speed of 100 (you can set it to the buller rigidbody velocity) and add a trigger event for detecting the damage zone to the player.
Your answer
Follow this Question
Related Questions
How to keep an array of targets in detection radius? 0 Answers
Enemy character floats while he moves back and forth 0 Answers
Help with 2D AI scripting 0 Answers
struggling with enemy AI 2 Answers