I have 3 of the same object (Mushroomcrab) in a layout and I need another object (Bosscrab) to go to the closest one to him. The one enemy has a Line of Sight behavior and is supposed to move toward one of the mushroomcrabs depending on an instance variable however it will always attempt to move toward the first mushroom crab that was placed on the layout rather than the closest one.
Is there a way to have the Bosscrab move towards the closest Mushroomcrab rather than the first one placed on the layout? Will I need to use the UID for objects to achieve this?