bj_mapInitialPlayableArea
with GetWorldBounds()
.function GetClosestDestructable takes real x, real y, boolexpr filter returns destructable
//globals: source, destination, picked
call GroupEnumUnitsInRange(source,x,y,range,filter)
loop
set picked = GetClosestUnitInGroup(x,y,source)
exitwhen picked == null or i == count
set i = i + 1
// actions (already sorted from closest to farthest)
// call GroupAddUnit(destination,picked)
call GroupRemoveUnit(source,picked)
endloop
// ^ is much more performant and works properly than these;
call GetClosestNUnitsInRange(x,y,range,count,source,filter)
call GetClosestNUnitsInGroup(x,y,count,source,destination)
I apologize for this late reply. As it turns out, it was actually line enumeration by icemanbo that had a destructable array.@Clanzion There are no native destructible groups exposed in Blizzard's interface.