Handling multiple instances of an enemy spawner

Hey guys! I have an enemy spawner that works fine on its own but when I add other instances of the spawner and then destroy one of them the other will start acting weird. Enemies take more damage or none at all, the spawner stops taking hits all kinds of stuff.

Anyways, my spawner works like this, player enters trigger and spawns tower, 1/2 sec later 4 enemies spawn at predetermined locations, if player destroys them all, spawner spawns 4 more and the cycle continues. Once the player destroys the spawner, no more enemies spawn and the player just has to kill the remaining enemies.

To clarify, I am trying to get my spawner to work like that regardless of how many I put in my scene.

Any ideas?

Enclosed are some pics of my blueprints for your viewing pleasure. The first three are of my spawner Blueprint and the last two are my enemy bp. Any help is greatly appreciated. That being said I think the issue is in pics 3 and 4 where I am using “get all actors of class” I just don’t know how I should be doing this better. If this isn’t clear enough let me know and I will try to explain those parts better.

To start, more or less a tip, apply “max Health” trough the construction script. This is a tad more efficient because its get called earlier. For the other issues, make sure as little variables are set by a spawner. What I can also recommend is to keep spawning in a “main spawner” and let that control 2 or more spawners at once so you do not have to destroy them.

Alright so I have found the solution that works. Maybe there is a better way not sure. So I split this into 3 blueprints, 1 to handle my enemy (of course), 1 for the spawner actor itself and 1 for the spawn point. Then I made 3 variables that referenced the others. The spawner referenced the spawn points in an array (So I can put as many as I want in it), the spawn point referenced the spawner to which it belongs and then the enemy references its specific spawn point. Since I really couldn’t find any one thing that really helped me with this I will be making a video and/or just putting the assets on the unreal store. But first I’m gonna mess with it a bit to try and get it more user friendly.