- Home /
Enemy AI With changing Player
Hello everyone, Im new to unity and newish to scripting but i am picking it up pretty fast. So my problem is this: I would like to write a script that does three things for an enemy ai.
Randomly move around
if it collides with a different type of enemy it changes into that enemy
if i shoot it it changes back to its original state
At first i made in an array of waypoints but after looking at it i decided i needed them to move randomly. i wrote a shoot script so im good on that part. i would also like it to be in javascript(unityscript) since im not very knowledgable with c# or boo
any help or direction would be greatly appreciated
thank you in advance.
Figure out collisions will vary depending on how you implemented your AI's. For example, if they are rigidbodies, then the coding is very easy. If they use character controllers, then things will be more involved.