How to Adjust Spawn Amounts
Last updated
Last updated
This page covers how to use the features of Procedural NPC Crowds in Blueprints.
There are 3 major ways to adjust spawn amounts in AI Zombie Swarms, I will show you all the ways here.
To adjust the max spawn per spawner, go to the BP_SwarmSpawner actor and change the max spawn amount.
To adjust the number of spawners, go to the BP_SwarmPath actor and find the Place Swarm Spawners event. From there, adjust the Spline Distance addition value. By default, it is set to 600, which spawns many spawners. I recommend values between 2000-4000 if you are not using the limiter system described below.
Access the Procedural Zombies Subsystem by searching for it in the blueprints context menu.
on the BP_SwarmSpawner put a branch check before the spawn amount with the Limit Zombies Spawned
from the procedural zombies subsystem, give it a value of the maximum you want to spawn in a level.
Now go to your Zombie Character class and on begin play use the Increment Zombie Spawned count
node from the zombies subsystem.
On EndPlay of the zombie character use the Decrement Zombies Spawned Count node.
That's it, there will now never be more zombies/swarms than you specify.