How do I make an enemy that once it gets a certain distance to the player character uses a range attack while the enemy follows a matinee after it spawns, in a 2D endless runner, the enemy follows a set path due to the matinee and so should the attack (in a straight line).