I have a bunch of fighters flying around shooting at eachother and all that works fine except each side goes for whichever of the enemy is first on the hierarchy instead of picking a random target. how can i get it to randomly pick a target?
function Start()
{
target = GameObject.Find("Fighter1").transform; //target the player
print(""+target);
}
function Update () {
if (target==null){
target=GameObject.Find("Fighter1").transform;
}
thanks!
how do i make an array though? thats where i'm getting hung up.
β cidmodder