|
hello guys, i want my AI's not to be too closer , so i made a code like this in the AI:
please help :)
(comments are locked)
|
|
Distance is used to get the distance between two objects - not change them. Your error is coming from the fact that you need to do
Your script (this should be attached to your AI) should do something like this:
(comments are locked)
|
|
actually the thing i want to make is different , i edited it , i don't want to make if statement or make the AI to move toward my player. I'm something like observer in the scene, i have 10 characters in group A 10 characters in group B fighting with each other with swords. I want group A characters to have at least 10 meters between each other. Okay well then just modify my answer to suit your needs... Also don't post comments as answers!
May 07 '11 at 07:53 PM
GesterX
(comments are locked)
|
|
I belive that "friend" already is a default var by Unity, try changing you var name. Also, you'll need to do like:
Maybe you can attach waypoints to the players, that are as far as tou like away from the player, and the other players follow those waypoints.
(comments are locked)
|
|
Put This Script In Your Friend: Put the tag Player in your player and don't put your player in the "var Player : Transform".
(comments are locked)
|
