Creating a custom FollowAI Script

Hello Aron, I’ve recently stumbled upon you pathfinding project and am just amazed! I am using it for the pathfinding in the game my student team is developing. I have everything running up to the point of having very basic AI movement and having the grid graph update based on the procedural generation of our environment. I now wish to build the functionality of having the enemies chase the player based on proximity, however the provided AIFollow script is quite dense and I’d prefer to do everything from the ground up so I understand all the functionality. Could you suggest the basics for having the path of the enemy update based on player movement? If there is any documentation I am missing than I apologize.

Hi

Have you read the Get Started guide in the documentation? That shows you how to write a very basic movement script.

Basically you would check
if ( distance to player < some value && time since last repath > some value ) { search path } else { idle }