FedPig's Recent Forum Activity

  • I FIGURED IT OUT!!! You were right (and I was right about me being an idiot)! In poking around, I noticed that the family, "EnvObjFam" had the setting "Layer" set as "Various". After switching this to "MainGameLayer", it worked. Foolish mistake!

  • Okay, I got around to testing your suggestion; It didn't work. I believe there may be something more fundamental that I am doing incorrectly. Because of that, I took a variety of screenshots that will hopefully make my mistake more obvious.

    This is where the objects are being created randomly within specified spawn zones:

    This is where I then am using your "On created/check if overlapping" suggestion and then delete the object:

    Here is the family group:

    Hopefully this is me being an idiot, but I am beating my skull against a brick wall trying to figure out what is going wrong.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This doesn't work. What am I doing wrong?

  • Sorry that it is ineligible. The forum doesn't seem to like copy/paste from Construct into code blocks... Odd.

    If I delete the family won't that delete all objects of the same type?

  • 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.

FedPig's avatar

FedPig

Member since 29 Jan, 2024

None one is following FedPig yet!

Trophy Case

  • RTFM Read the fabulous manual
  • Email Verified

Progress

2/44
How to earn trophies