Hey guys! I'll try to explain this as best I can. I'm trying to spawn (x) amount of objects in a certain space, but I need specific objects to spawn, and the rest of the space to be filled with multiple instances of another object.
I already have the space defined with an array, but now I need to manipulate how objects spawn within that array. Let's say I have a space like this :
As you can see I have a 3x3 space of the same object, but let's say I want to inject two different objects into the 3x3 space, spawning in random available spaces in that 3x3 space and filling the remaining slots with our blue circle control group every time the layout is run, like this :
or this :
The problem isn't spawning the unique objects in random positions in the 3x3 space and filling the rest of the 3x3 space with one object with multiple instances. The problem is that when the unique objects spawn in the 3x3 space, there's a chance that they will overlap one another. Let's say I want to spawn 2 unique objects among the controlled object with multiple instances in the 3x3 space. I need a way to ensure that they won't spawn on the same tile If one unique objects spawns on one space, I need to make sure that the other object knows that space is no longer available to spawn on.