I have a unit which needs to find one of 12 units to attack based on which unit is closest to it. I have
I don't want to use the in-game trigger for "UnitGroupClosetToPoint()" because my system/map uses a XYZ variables for the unit positions and units can go off the map so I need to compare 12 units XYZ to find the closest unit to it.
I have a unit which needs to find one of 12 units to attack based on which unit is closest to it. I have
I don't want to use the in-game trigger for "UnitGroupClosetToPoint()" because my system/map uses a XYZ variables for the unit positions and units can go off the map so I need to compare 12 units XYZ to find the closest unit to it.
Well, if you don't want to use the function, you calculate the 3d distances and use the min function do compare them.
Thank you. I think that should work.