This is an algorithm to find the distance of one sprite to a certain x and y position. How did I make this? Well, I simply used the pythagorean theorum. Feel free to use! No credit needed.