I am making a tower defense game for school and I have come across a problem. I am currently using the get neighbours command to get of list of enemies within the range of the tower. The problem emerges here I need to get the X and Y locations of enemy. After I get the locations I can send those locations to my projectile class so it can move to that location and destroy the object. My teacher and partner suggested assigning a variable in the enemy class that will increment with each one created so I can use a for loop to prioritize the first enemy within range. Sadly the X and Y locations being sent to the actor are not correct causing the projectiles to fly in the wrong direction. the tower is detecting the enemy and firing the projectiles when they come into range but the heading of the projectiles is completely off.

