Get nearest instance of object in a group

I am making a teams 8v8 game and I want to have 2 object groups, red and blue. The red team is all bots who should use the pathfinding engine to locate the nearest instance of a blue group object, which contains the player and 7 bots. How do I get the nearest instance of an object in either group and set it to an objects pathfinding target x/y? If any more information is needed I will provide it, just ask

Hi I don’t know if this is the best way but you need
Foreach RedGroup
Pick Nearest BlueGroup


In this case is WolvesGroup nearest to EnemyBulletsGroup
In your case Is RedGroup nearest to BlueGrop

1 Like

awesome thanks i will test this out to see if it works thanks again for your help