diff --git a/modules/cloneZone.lua b/modules/cloneZone.lua index 8f43669..b70f0f0 100644 --- a/modules/cloneZone.lua +++ b/modules/cloneZone.lua @@ -1,5 +1,5 @@ cloneZones = {} -cloneZones.version = "1.0.0" +cloneZones.version = "1.0.1" cloneZones.verbose = false cloneZones.requiredLibs = { "dcsCommon", -- always @@ -14,6 +14,7 @@ cloneZones.cloners = {} Version History 1.0.0 - initial version + 1.0.1 - preWipe attribute --]]-- @@ -93,6 +94,8 @@ function cloneZones.createClonerWithZone(theZone) -- has "Cloner" theZone.moveRoute = cfxZones.getBoolFromZoneProperty(theZone, "moveRoute", false) + theZone.preWipe = cfxZones.getBoolFromZoneProperty(theZone, "preWipe", false) + if cfxZones.hasProperty(theZone, "empty+1") then theZone.emptyFlag = cfxZones.getNumberFromZoneProperty(theZone, "empty+1", "") -- note string on number default end @@ -114,6 +117,9 @@ end -- function cloneZones.despawnAll(theZone) + if cloneZones.verbose then + trigger.action.outText("wiping <" .. theZone.name .. ">", 30) + end for idx, aGroup in pairs(theZone.mySpawns) do Group.destroy(aGroup) end @@ -295,6 +301,11 @@ function cloneZones.spawnWithCloner(theZone) end return end + + -- pre-Wipe? + if theZone.preWipe then + cloneZones.despawnAll(theZone) + end -- local myLoc = cfxZones.getPoint(theZone) local theClones = cloneZones.spawnWithTemplateForZone(templateZone, theZone) diff --git a/modules/pulseFlags.lua b/modules/pulseFlags.lua index 5fc7962..8d087c4 100644 --- a/modules/pulseFlags.lua +++ b/modules/pulseFlags.lua @@ -30,8 +30,9 @@ function pulseFlags.createPulseWithZone(theZone) -- time can be number, or number-number range theZone.minTime, theZone.time = cfxZones.getPositiveRangeFromZoneProperty(theZone, "time", 1) - - trigger.action.outText("***PulF: zone <" .. theZone.name .. "> time is <".. theZone.minTime ..", " .. theZone.time .. "!", 30) + if pulseFlags.verbose then + trigger.action.outText("***PulF: zone <" .. theZone.name .. "> time is <".. theZone.minTime ..", " .. theZone.time .. "!", 30) + end theZone.pulses = cfxZones.getNumberFromZoneProperty(theZone, "pulses", -1) theZone.pulsesLeft = 0 -- will start new cycle diff --git a/tutorial & demo missions/demo - Attack of the CloneZ.miz b/tutorial & demo missions/demo - Attack of the CloneZ.miz index ab01c7c..605cbee 100644 Binary files a/tutorial & demo missions/demo - Attack of the CloneZ.miz and b/tutorial & demo missions/demo - Attack of the CloneZ.miz differ