EntityDistance.
I wouldn't just base the AI on distance, though. You'll probably wan't to consider the direction the ball is travelling, and it's velocity.
I wouldn't just base the AI on distance, though. You'll probably wan't to consider the direction the ball is travelling, and it's velocity.