http://pastebin.com/EBzb8smp
This chunk of code will make an AI follow the closest player; The problem? If the player moves in a certain way, the AI will follow the points that the player's path leaves NO MATTER how far away the points are from the player! This means that it will not change course until it gets to the next point in the table, no matter how far away the point actually is; I need the AI to pathfind its way to the player no matter what.
|