How to Spawn AI Enemies in a Custom Map

In this guide we're going to walk through the steps of adding the LPSP AI enemies to a custom map.

  • The first step is to add a Nav Mesh Bounds Volume to the map. This will determine the area that the AI enemies can spawn and move around within.

  • Let's scale it up quite a lot, so that they have enough room to move around in the map.

  • Next we need to add the BP_LPSP_AI_Spawner blueprint actor to the map, this is what will actually spawn the AI enemies.

  • It is located here: InfimaGames > LowPolyShooterPack > Core > AI

  • We can simply drag and drop it into the map.

  • We also need to add one or more spawn points to determine where the AI can actually spawn.

  • Drag BP_LPSP_AI_Spawn_Point into the map, feel free to place out a few of these (just make sure they're not clipping through the ground).

  • Here's what it looks like now:

  • Now we need to decide how many AI enemies we want to be spawned.

  • We can modify that by changing the Amount value on the spawner blueprint actor.

Spawning a lot of enemies will affect performance negatively, so try to keep the amount reasonable.

  • If we play now, we can see that the enemies have spawned in the map, and are spread out across the spawn locations. However, they are not moving around, this is because we haven't added any interest points for them to patrol between yet.

  • So let's do that now, go back to the folder and drag a few BP_LPSP_AI_Interest_Point actors into the map.

  • Place them out with some distance between them, these are basically the world space points that the AI enemies will "patrol" between.

  • If we play again, we can see that the AI enemies are moving around as expected!


Last updated

Was this helpful?