- Home /
Top Down Shooter Enemy AI using raycasting
I'm new to unity and i have absolutely no experience in JavaScript and i am working on a top down shooter i have just about everything covered but i don't know how to do enemy AI at all I want to know how to make my enemies take cover from me and still try to damage the player occasionally and other types of enemies that can navigate in "hallways".
an example demo or scripts or even just help will be greatly appreciated.
The video kinda shows what i want.
Answer by Borgo · Jan 13, 2011 at 07:11 PM
The best way is to try to script by yourself, don't use ready scripts, if you need to change something, you will have problems.
Start to think about actions that your enemies will do, write everything in a paper.
Use a variable like Action : String
create a script like this:
if (action == "hide"){
//run to a nearest determined point
}else{
//atack your player
}
Try to not do "deep AI" at first time, you need to evolute your logic programing.
And, try to not post things like "how to make this game" or "i need a script that...". Try your self and you have a specific question, everyone will be happy to help you.
Good look.
Your answer
Follow this Question
Related Questions
AI controller script, Enemy movement issues 0 Answers
Problem with the movement of AI 1 Answer
Rotating on X and Z axis only 2 Answers
Checking name from hit from Raycast in array 2 Answers
Collsions problem 0 Answers