- Home /
How to make Enemies
I need information for that how to make enemies who attacks in range.
can we get some more input on what you want? what kind of enemy is it you want? is it people who runs around and shoot you or is it some turrets?
I$$anonymous$$ READY WITH THE TURRETS NOW I NEED $$anonymous$$NIGHT ENE$$anonymous$$Y HOW ATTAC$$anonymous$$S IN RANGE
Answer by Owen-Reynolds · Jul 17, 2012 at 09:05 PM
The Angry Bots demo has got shooting turrets.
You can open it in Unity, play it to see who shoots, select the shooters, open up the scripts and see how they work. Then can make some small changes and play again to see if you understand it.
Also, can't resist, another way to make enemies is to not look things up :-) Lots and lots of people here have gotten help with enemy spawning/shooting scripts. You can read those to see what they did.
voted up. Great answer. other people will probably also need to read this post to remember the demo and check it out.
Answer by SimonAlkemade · Jul 17, 2012 at 01:57 PM
check for the distance and shoot, something like this: if(Vector3.Distance(turret.position, enemy.position) < attackDistance){turrent.LookAt(enemy.position); StartCoroutine(Shoot());}
Your answer
![](https://koobas.hobune.stream/wayback/20220613074309im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to correctly do an enemy ranged attack script? 0 Answers
Scripts for enemies ! 0 Answers
How do I make my player re-spawn in its original place on collision of enemy? 1 Answer
Enemy VISION range? Help! 0 Answers
Loading new level after killing enemies 3 Answers