Enemy spawn in range

Ok, so there are a lot of forums on spawning enemies, but I can’t find one with my specific problem. So I have it set where when you collide with a sprite (visual much smaller than size), the enemy spawns. I have it working when I have one set up, success? The problem is, the moment I add a second sprite, it no longer spawns. I have the variable specific to the object. Not sure how to have it work when I have several of the same sprites in game.

Try to check the number of created objects to determine whether to create them

The reason for this is that the zorder of the object you create is uncertain

It’s set to the Base layer. It works when I only have one of the object, but the moment I have more than one, it stops.

I gave up and found another way to get the same result. If anyone in the future sees this, here’s what I did

Basically turned it INTO the enemy rather than spawning an enemy