Sorry for the long title that still didn't explain much. I am new to Construct, I have been fumbling my way around and getting most things to "work" (maybe not very efficiently, but they "work"). That is except for this super annoying issue that I spent most of today trying, and failing, to solve.
The game procedurally generates spawn zone for enemies, items, and environmental sprites/objects. The environmental sprites come in five sizes and are separate objects. They are created through the following:
+ System: For each EnvironmentalSpawnZone
-> System: Set RandEnvSpawnAmount to int(random(1,6))
----+ System: For "n" from 1 to RandEnvSpawnAmount
-----> System: Set RandomSpawnCreator to int(random(1,6))
--------+ System: RandomSpawnCreator = 1
---------> System: Create object TinyObj on layer 0 at (random(EnvironmentalSpawnZone.BBoxLeft+TinyObj.Width,EnvironmentalSpawnZone.BBoxRight-TinyObj.Width), random(EnvironmentalSpawnZone.BBoxTop+TinyObj.Height,EnvironmentalSpawnZone.BBoxBottom-TinyObj.Height)), create hierarchy: False, template: ""
---------> TinyObj: Set angle to int(random(0,360)) degrees
--------+ System: RandomSpawnCreator = 2
---------> System: Create object SmallObj on layer 0 at (random(EnvironmentalSpawnZone.BBoxLeft+SmallObj.Width,EnvironmentalSpawnZone.BBoxRight-SmallObj.Width), random(EnvironmentalSpawnZone.BBoxTop+SmallObj.Height,EnvironmentalSpawnZone.BBoxBottom-SmallObj.Height)), create hierarchy: False, template: ""
---------> SmallObj: Set angle to int(random(0,360)) degrees
--------+ System: RandomSpawnCreator = 3
---------> System: Create object LongObj on layer 0 at (random(EnvironmentalSpawnZone.BBoxLeft+LongObj.Width,EnvironmentalSpawnZone.BBoxRight-LongObj.Width), random(EnvironmentalSpawnZone.BBoxTop+LongObj.Height,EnvironmentalSpawnZone.BBoxBottom-LongObj.Height)), create hierarchy: False, template: ""
---------> LongObj: Set angle to int(random(0,360)) degrees
--------+ System: RandomSpawnCreator = 4
---------> System: Create object LargeObj on layer 0 at (random(EnvironmentalSpawnZone.BBoxLeft+LargeObj.Width,EnvironmentalSpawnZone.BBoxRight-LargeObj.Width), random(EnvironmentalSpawnZone.BBoxTop+LargeObj.Height,EnvironmentalSpawnZone.BBoxBottom-LargeObj.Height)), create hierarchy: False, template: ""
---------> LargeObj: Set angle to int(random(0,360)) degrees
--------+ System: RandomSpawnCreator = 5
---------> System: Create object HugeObj on layer 0 at (random(EnvironmentalSpawnZone.BBoxLeft+HugeObj.Width,EnvironmentalSpawnZone.BBoxRight-HugeObj.Width), random(EnvironmentalSpawnZone.BBoxTop+HugeObj.Height,EnvironmentalSpawnZone.BBoxBottom-HugeObj.Height)), create hierarchy: False, template: ""
---------> HugeObj: Set angle to int(random(0,360)) degrees
The issue is that means that the environmental objects (Huge, large, long, small, tiny) can and are overlapping each other sometimes. I have tried the similar loops for each object to the following in an attempt to correct this issue with no success:
+ System: For each HugeObj
----+ HugeObj: Is overlapping HugeObj
----+ OR HugeObj: Is overlapping LargeObj
----+ OR HugeObj: Is overlapping LongObj
----+ OR HugeObj: Is overlapping SmallObj
----+ OR HugeObj: Is overlapping TinyObj
-----> HugeObj: Toggle Overlap
----+ HugeObj: Is Overlap
-----> HugeObj: Destroy
What am I doing wrong here? I have also tried to destroy without using the boolean.