I made this example while trying to figure out a better AI for a turret in one of my games
Features:
- Picks closest enemy to the player using qualifiers
- You can modify the firing cone within 360 degrees
- You can modify the range of the turret (in pixels)
Not sure if this is the most efficient way to do this. It works using fast loops and for each loops. If there is a more efficient way I would love an example and if not, I hope this helps someone