Hey,
I have been creating a “lane” type game, think of the league of legends minions. Where you sent fighters down a lane towards the enemy base, and they enemy does the same back to you.
I am up to the part of programming the minions to attack each other on sight, I have the agent currently set to the enemy base, however I want to set it to the closest minion that comes into range of there “sight” and for them to move towards them (and then i can program the attacking!)
I am guessing I am to store the minions into an array that it finds the closest out of them, however I am not too sure how to do this, also minions will always be spawning so it needs to be constantly updating!
Any help is hugely appreciated. Thank you.