(Solved)Problems with Sprites Spawn

My walls consists out of two sprites:
The one’s that I called WallabovePreset0/11,

and the one’s that I called Walla0/11 (don’t ask why)

Every wall has a second piece that perfectly matches with it.

The events are really simple:

Now, when you have all of them in one scene at the same time everything
is fine:

But if you have only one, they all spawn on it:

But that’s not the worst part.
If I turn the world generation on, this will happen:

(I use an extension called CreateMultipleCopiesofObject which copies Objects for you)

my events for generation:

What they do is create a grid and then spawn the WallabovePresets on it.

Almost none of them spawn!
I need the two sprites to spawn together.

Guys I’m trying to solve this the hole day and ran out of ideas, so anything could help!

To me it does look like they’re getting spawned. They’re just getting spawned on top of each other.

You saying “200 times, pick a random grid tile, then create the object”

You’re not deleting grid tiles until after the 200 times is completed. This means that there’s a chance for many of the tiles to be created at the same place.

You should instead just have it delete the grid tile ass an action within the repeat 200 times, so that way after creating a wall on that tile, it cannot use that same tile for any additional instances.

Thank you for the advice!

But there’s still a problem with the second part of the wall

I would probably recommend the following:

  1. Remove your current event that creates the Walls0-11 objects.
  2. Add all of your wallabovepreset to an object group if not already.
  3. under your “at the beginning of the scene” event that your Repeat 200 subevent was in, create a new “For each object” event (as a subevent of the at the beginning of the scene). Select the object group mentioned above as the target.
  4. In the for each object event, create 11 subevents, which follow the following formatting:
    Conditions: (Compare two strings) ObjectGroupNamehere.ObjectName = “WallAbovePreset0”
    Actions: Create Walls0 at position blah

You’d do this for each permutation of WallAbovePreset/Walls.

Thank you! I’ll try it!

It worked! thans a lot!

1 Like