[Solved] Help me please, guys, to make this spawning system

Everything from the first screenshot works. I’m just showing here that every instance of Wall_side gets personal_enemy_spawn variable. On the second screenshot you can see that if Wall_side has this variable =1 so it should spawn an enemy on itself. But this works one time only. Actually no matter if i use this variable or not. Only first Wall_side creates an enemy on itself.

I’ve tried an alternative method as well :

It creates an enemy on every Wall_side but the enemy can’t be deleted after his death.

The Trigger once while true within a Repeat for each object does not act on each instance - it does it’s determination on the objects as a whole. So the first time it checks that the value of personal_enemy_spawn =1 of the Wall_side object.

For the second instance of the object, the trigger once sees the checked the value for personal_enemy_spawn of a Wall_side object is again 1, so it ignores the action.

Here’s a post discussing something similar and with a solution that you could adapt to your situation.

I tried without trigger once - it spawns enemies every frame. I tried without “for each object” - it still doesn’t work.

Well yeah, because you haven’t changed the value of personal_enemy_spawn. I’m not sure what you’re trying to achieve here though. Is it a once off spawn, a periodic spawn or something else?

Just as side note there is extension called object spawner
Where you give its behavior to some object
Now you can manipulate what that object is spawning
Where it spawns it
How often
And you can place spawner object anywhere on the map

Wall_side is a platform that is spawned infinitely in front of the player. I wanted every Wall_side to spawn an enemy or any other object on itself. I’ve solved it. This is the perfectly working spawning system. Now i can spawn any objects on the every instance of every other object :