Creating Ally AI That Locates Nearest Enemy and Attacks In this tutorial, you will learn: Basic for loop usage Basic array usage How to find the distance between two points How to use Math.atan2() to have MovieClips follow each other How to fire projectiles How to split a velocity vector into two perpendicular lines using [...]