Fast Pathfinding AI, made using A* If the mouse is in view, the AI will follow the mouse; otherwise, it will wander around. You can make other levels inside the project if you want to do more testing.
All code by me, @-God_Coder- A* is a VERY fast pathfinding formula that I have edited slightly to make it work in Scratch. A Weighted A* formula allows it to run faster, though sometimes it may not find the shortest.