Hi,
I can't upload a screenshot but that's how it works for me:
Global Number "NumberOfObjects" = 40 <<<<<(change this to the max amount of Objects that should be spawned)
[Group] ObjectSpawn:
System: Every tick
----------> (SubEvent) If Sprite.Count < NumberOfObjects -------> System: Create object Sprite on layer 0 at random...
---------->(SubEvent) If Sprite is overlapping Sprite --------> Sprite: Destroy
Just do this if you want to stop spawning the objects:
Sprite: Is NOT overlapping Sprite ------> System: Set group "ObjectSpawn" deactivated
System: Sprite is NOT < NumberOfObjects ------^
I don't know why i can't upload images :/
I hope it helps