diff --git a/Scripts/Range.lua b/Scripts/Range.lua index 65adc54..4767a9a 100644 --- a/Scripts/Range.lua +++ b/Scripts/Range.lua @@ -37,24 +37,34 @@ do local sectionName = '-Urban-'..j points = Utils.getWayPoints(zoneGroupName..sectionName) - if points then - Range.drawPolygon(points) - trigger.action.textToAll(-1,Utils.getMarkID(),Utils.makeVec3(points[1]),{1,1,1,1},{0,0,0,0},8,false,sectionName) + if not points then + break end - - sectionName = '-Tree-'..j + + Range.drawPolygon(points) + trigger.action.textToAll(-1,Utils.getMarkID(),Utils.makeVec3(points[1]),{1,1,1,1},{0,0,0,0},8,false,sectionName) + end + + for j=1,100,1 do + local sectionName = '-Tree-'..j points = Utils.getWayPoints(zoneGroupName..sectionName) - if points then - Range.drawPolygon(points) - trigger.action.textToAll(-1,Utils.getMarkID(),Utils.makeVec3(points[1]),{1,1,1,1},{0,0,0,0},8,false,sectionName) + if not points then + break end - sectionName = '-Open-'..j + Range.drawPolygon(points) + trigger.action.textToAll(-1,Utils.getMarkID(),Utils.makeVec3(points[1]),{1,1,1,1},{0,0,0,0},8,false,sectionName) + end + + for j=1,100,1 do + local sectionName = '-Open-'..j points = Utils.getWayPoints(zoneGroupName..sectionName) - if points then - Range.drawPolygon(points) - trigger.action.textToAll(-1,Utils.getMarkID(),Utils.makeVec3(points[1]),{1,1,1,1},{0,0,0,0},8,false,sectionName) + if not points then + break end + + Range.drawPolygon(points) + trigger.action.textToAll(-1,Utils.getMarkID(),Utils.makeVec3(points[1]),{1,1,1,1},{0,0,0,0},8,false,sectionName) end end