Spawning NPCs
Let's talk about placing characters onto a map. Each Bitpart archetype comes with their own character blueprint, which can be found within it's folder structure in the content browser. You can also use your own!
What is a Spawn Target?
Spawn Targets are the assets we've created for our own spawn system. If you have your own spawn system, then you do not need to use ours.

BP_BitpartTargetPoint(found in the Content Browser under All → Plugins → Bitpart.AI Content → StarterPack → Blueprint) should be placed in your level at the location and rotation you want the NPC to be spawned. It should be the NPC's half capsule height above the floor, which in our case is 88 unitsOnce you have the spawn target in place, you'll need to specify which character spawns there using the cast spawner.
What is a Cast Spawner?

Cast spawners allow you to manage which NPCs are in a cast and where in the level they spawn. A cast, for those wondering, is a group of characters that will perform behaviors together or interact with each other. It's possible for a single character to be in a cast by themselves, but the purpose is generally to interact with other NPCs.
You'll use one cast spawner for every cast you want to add to your level. We'll speak to how exactly you would set-up a cast spawner in the Adding a Bitpart Character into a Level section below.
We also have a more in-depth dive into casts that you can read here.
Adding a Bitpart Character into a Level
There are two different ways to add a character into your level. You can either spawn them in dynamically or place them directly onto the map.
At a high level, these are the steps that go into both if you're using Bitpart's spawning system:
If spawning dynamically...
Create character blueprint(s)
Add the SpawnTarget to the map
Add the CastSpawner
If adding character directly...
Create character blueprint(s)
Drag the character blueprint(s) onto your map
Add the CastSpawner
Let's dig deeper and walk through both in full.
Spawning Dynamically
Choose the character you'd like to add to the level. Each archetype has its own character blueprint found within it's folder structure in the content browser. If you'd prefer to use a pre-existing character of yours, you can turn it into a Bitpart character following these instructions.

Add the SpawnTarget to the map.
Search for
BP_BitpartTargetPointin the Content Browser. Place it in your level at the location and rotation you want the NPC to be spawned. It should be the NPC's half capsule height above the floor, which in our case is 88 units

Add the CastSpawner to the map.
Search for
BP_CastSpawnerin the Content Browser. Drag the spawner onto your map.

Navigate to the Details panel, and under the first
Cast Spawnersection add a new element. There are two fields to fill out. Here's what they are and why you would use them:Specific for dynamic spawning:
PawnClass| select the character blueprint of the character you'd like added to the castSpawnPointActor| select the spawn target associated with your character
There is an optional Tags field in this section. You can use this to attach a gameplay tag to an NPC spawned at this particular target point. You can see an example of how to use this in our tutorial on Triggering Tasks via Blueprints. [MAKE THIS A LINK]
If you want a cast to be planned into as soon as it finishes spawning, make sure
Start Planner for Castunder the second Cast Spawner section is toggled onIf you want this cast to be the cast that the player starts in then check on Player Initial Cast
Adding a Character Directly
Choose the character you'd like to add to the level. Each archetype has its own character blueprint found within it's folder structure in the content browser. If you'd prefer to use a pre-existing character, you can turn it into a Bitpart character following these instructions.
Place the character onto your map.
Add the CastSpawner to the map.
BP_CastSpawner(found in the Content Browser) is an example spawner. If you have your own spawning system for your game then you can use that instead. We'll be usingBP_CastSpawnerfor this tutorial.Drag the cast spawner onto your map

Specific for direct placement:
PawnPlacement| reference the placed NPC instance in this fieldIf you want a cast to be planned into as soon as it finishes spawning, make sure
Start Planner for Castunder the second Cast Spawner section is toggled onThere is an optional Tags field in this section. You can use this to attach a gameplay tag to an NPC spawned at this particular target point. You can see an example of how to use this in our tutorial on Triggering Tasks via Blueprints. [MAKE THIS A LINK]
Adding Multiple Bitpart Characters to a Map
Every Bitpart reference map is set-up with only a single archetype, but they are meant to be integrated into your gameplay, which means operating alongside other archetypes. At a very high-level the process looks like this:
Add a new Spawn Target to your map
Add the character to a cast
Last updated
