- Home /
How can i make my enemy walk random in my level?
I have been having a problem for a while, I need my enemy to walk random in my level but i can't find any help there. I am currently watching Bergzergarcade's videos and using his "target enemy script" but i need random walking not target right away. Can someone help me get my enemy to walk random and target my player when i'm close enough to him? In C# Please i don't use java!!!
Answer by Kryptos · Jun 19, 2012 at 01:34 PM
I can't give you a script because this is not what this website is for.
Anyway, here are some tips:
Make your ennemy follow a set of waypoints.
When the player is close enough (use Vector3.Distance for example), make it target and follow your player.
You can take a look at UnitySteer which already has some of the scripts you need. It has an interesting "wandering" script that is a good alternative to waypoints following.
How do i use these waypoints? i have not learned that yet. would be great with a speed course in that.
Your answer
Follow this Question
Related Questions
random direction of enemy when collide whit wall 1 Answer
Move Enemy randomly in a range. 3D 0 Answers
Random enemy fire rate 4 Answers
2d enemy prefab (enemy movement and instantiate) 0 Answers
Sometimes strange behaviour of my 'walk around' script 0 Answers