thats it? so i just past it at the bottom with my AI trigger? i dont know where to put this tbh. i want Ally's from a trigger spawn i made to follow the player. so that script will work? Double Post Merge: May 22, 2017, 10:28:03 pm
thats it? so i just past it at the bottom with my AI trigger? i dont know where to put this tbh. i want Ally's from a trigger spawn i made to follow the player. so that script will work?
Code Snippet
Plaintext
ai_behaviour() { ai = getAIArray("allies"); player = GetPlayers(); for(;;) { for (i = 0; i < ai.size ; i++) { if(Distance(ai[i].origin, player[0].origin) > 4) { ai[i] setGoalPos(player[0].origin); } } wait(5); } }
thats code i was using for AI to follow players but they dont go to the player frequently and they seem to get distracted by Enemy's but when there are no Enemy's they still dont try and move to the player sometimes!