Help with a Spawning Actor

Hello Everyone,

I created this actor which would spawn an enemy to the map. So far it works to some degree.

The problem is that is spawns way too many actors which is a HUGE hit to performance.

The second issue is that I want it to only spawn if the enemy is dead (there is a bool variable that is activated when the enemy is dead).

My aim was for it to chose a random point within the area around this actor to spawn an enemy. It would then wait until of the spawned actors are dead and then spawn more after a wait period.

Any help would be fantastic!

Quick Note:

I’m trying to avoid using the Event Tick in order to keep performance because of the scale of the game. The Timeline is set to .50 and is set to Autostart and Loop.

Update:

I actually got it working the way I want, but the problem is that the spawned actors are being placed halfway through the floor. Any suggestions? I believe the problem is the Get Random Point in Radius node.

Hi.

Have you tried adding a + z value in your location making the transform?
Break the return value of random point, + value to the z, then make transform

You should use timers for executing the nodes, and maybe break your location from your random point and set Z to the floor Z value.

When spawning, I have found out, depending on the mesh, spawn it stupid places. It has something to do with the Mesh and its’ anchor point.

I would just move the mesh up and down in the components tab until in spawns above the ground.

Else look at you mesh in the components tab and make sure it is spawning at 0/0/0