So thanks to Social, I now have a great track-to-next-nearest Script. This script got me thinking about how it can be used for a simple AI where empties are used do define specific paths. For example, if an enemy is attacked it will track to the nearest empty with a property named “cover”, so he will try to hide from the shots. Another idea is for an enemy sniper who loves to camp (“it’s a legitimate strategy!”), you could program him so that if he is shot, he will track to the nearest empty with a property named “sniper_path”. Once near enough to that empty, he will track to the next nearest empty with a property named “sniper_path”. He will continue to do this until he reaches an empty named “snipe_spot”, where he will set up his tent, cook a pot of beans, and pick off your allies as if they were highway flies on a transport truck. This is where the problem comes in, He won’t fallow a path. He tracks to the first and the second ok, but after that he just sort of randomly decides where to go. Here’s an example. Hopefully you will have more luck!
Dumb_AI.blend (171 KB)