Hey, I started to poke around with Worldedit few weeks ago and wanted to create "revolving" creep spawns. I can't come up with any better name for it.
So I created 6 regions where creeps spawn in next region after I kill them with condition that creeps in next spawn are dead. All good. Problem is that i can't remove leaks as I can't destroy Unit Group variable - it is condition in next cycle.
I tried whatever I could think of or find, but I lack vision. Please help to come up with technique to make this elegant and remove leaks.
So I created 6 regions where creeps spawn in next region after I kill them with condition that creeps in next spawn are dead. All good. Problem is that i can't remove leaks as I can't destroy Unit Group variable - it is condition in next cycle.
I tried whatever I could think of or find, but I lack vision. Please help to come up with technique to make this elegant and remove leaks.
-
BanditCreepInit
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Set creepRegions[1] = secretCreep1 <gen>
-


Set creepRegions[2] = secretCreep2 <gen>
-


Set creepRegions[3] = secretCreep3 <gen>
-


Set creepRegions[4] = secretCreep4 <gen>
-


Set creepRegions[5] = secretCreep5 <gen>
-


Set creepRegions[6] = secretCreep6 <gen>
-


Set testCreep[1] = (Units in creepRegions[1])
-


Set testCreep[2] = (Units in creepRegions[2])
-


Set testCreep[3] = (Units in creepRegions[3])
-


Set testCreep[4] = (Units in creepRegions[4])
-


Set testCreep[5] = (Units in creepRegions[5])
-


Set testCreep[6] = (Units in creepRegions[6])
-


Set SecretCreepPoints[1] = (Center of secretCreep1 <gen>)
-


Set SecretCreepPoints[2] = (Center of secretCreep2 <gen>)
-


Set SecretCreepPoints[3] = (Center of secretCreep3 <gen>)
-


Set SecretCreepPoints[4] = (Center of secretCreep4 <gen>)
-


Set SecretCreepPoints[5] = (Center of secretCreep5 <gen>)
-


Set SecretCreepPoints[6] = (Center of secretCreep6 <gen>)
-
-
-
BanditCreepSpawn
-

Events
-


Unit - A unit Dies
-
-

Conditions
-


(Unit-type of (Triggering unit)) Equal to Bandit (secret creep)
-
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(All units of testCreep[1] are dead) Equal to True
-




(All units of testCreep[2] are dead) Equal to True
-




((Triggering unit) is in testCreep[1]) Equal to True
-
-



Then - Actions
-




Unit - Create 6 Bandit (secret creep) for Neutral Hostile at SecretCreepPoints[2] facing Default building facing degrees
-




Set testCreep[2] = (Last created unit group)
-
-



Else - Actions
-
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(All units of testCreep[2] are dead) Equal to True
-




(All units of testCreep[3] are dead) Equal to True
-




((Triggering unit) is in testCreep[2]) Equal to True
-
-



Then - Actions
-




Unit - Create 6 (Unit-type of (Triggering unit)) for Neutral Hostile at SecretCreepPoints[3] facing Default building facing degrees
-




Set testCreep[3] = (Last created unit group)
-
-



Else - Actions
-
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(All units of testCreep[3] are dead) Equal to True
-




(All units of testCreep[4] are dead) Equal to True
-




((Triggering unit) is in testCreep[3]) Equal to True
-
-



Then - Actions
-




Unit - Create 6 (Unit-type of (Triggering unit)) for Neutral Hostile at SecretCreepPoints[4] facing Default building facing degrees
-




Set testCreep[4] = (Last created unit group)
-
-



Else - Actions
-
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(All units of testCreep[4] are dead) Equal to True
-




(All units of testCreep[5] are dead) Equal to True
-




((Triggering unit) is in testCreep[4]) Equal to True
-
-



Then - Actions
-




Unit - Create 6 (Unit-type of (Triggering unit)) for Neutral Hostile at SecretCreepPoints[5] facing Default building facing degrees
-




Set testCreep[5] = (Last created unit group)
-
-



Else - Actions
-
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(All units of testCreep[5] are dead) Equal to True
-




(All units of testCreep[6] are dead) Equal to True
-




((Triggering unit) is in testCreep[5]) Equal to True
-
-



Then - Actions
-




Unit - Create 6 (Unit-type of (Triggering unit)) for Neutral Hostile at SecretCreepPoints[6] facing Default building facing degrees
-




Set testCreep[6] = (Last created unit group)
-
-



Else - Actions
-
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(All units of testCreep[6] are dead) Equal to True
-




(All units of testCreep[1] are dead) Equal to True
-




((Triggering unit) is in testCreep[6]) Equal to True
-
-



Then - Actions
-




Unit - Create 6 (Unit-type of (Triggering unit)) for Neutral Hostile at SecretCreepPoints[1] facing Default building facing degrees
-




Set testCreep[1] = (Last created unit group)
-
-



Else - Actions
-
-
-




