# Crowds of NPCs

## Overview <a href="#overview" id="overview"></a>

NPC crowds provide a way to populate your world with large numbers of animated characters, bringing your world to life even in areas where players might not naturally congregate.

<figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-905188698eeff8db30e357e941bc0ff9678b2b95%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

These NPCs have no networking or physics cost and exist solely client side. They are purely for visual flair and not must not be used for gameplay purposes, nor do they offer a guarantee of being synchronised (in appearance or animation) between two or more clients.

## Placing an NPC crowd <a href="#placing-a-npc-crowd" id="placing-a-npc-crowd"></a>

### Placing the crowd members <a href="#placing-the-crowd-members" id="placing-the-crowd-members"></a>

Crowd members can added via blueprint. The initializer, transform and anim name can be set when adding a new crowd member with `Add Crowd Member`

Crowd members can be preloaded via `Preload Instances` If you know how many crowd members will be added, calling this will make the adding process quicker.

See \``BP_NpcCrowdExample` for an example as to how this can be done.

### Defining a crowd <a href="#defining-a-crowd" id="defining-a-crowd"></a>

Start by placing an `AM2_NpcCrowd`your level. `BP_NpcCrowdExample` is an example of an NPC crowd actor. Either duplicate and modify this asset or create a new one for your project.

This actor is an example BP for configuring the crowd, it allows you to configure the meshes it uses and other properties.

#### Initializers

In your NPC crowd blueprint, the crowd meshes can be configured like below.

<figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-a77032d252e21bc38d038459506bd98301cdbdd9%2Fimage.png?alt=media" alt="" width="526"><figcaption><p>BP_NpcCrowdExample Initializers detail panel</p></figcaption></figure>

#### Animations

The list of animations can be configured like below.

<figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-46e3512ee8d518755b292a78ed1ddee9f99c3ede%2Fimage.png?alt=media" alt="" width="526"><figcaption><p>BP_NpcCrowdExample AnimList details panel</p></figcaption></figure>

In your `AM2_NpcCrowd`, set the following properties:

* Crowd Data: `M2Content/Content/AnimatedCrowd/DA_SkeletalCrowdData_LoD1`
* Ism Actor Type: `M2Content/Maps/TestGyms/CrowdTestGyms/BP_SkeletalCrowdIsm_LoD1`

If your project has its own crowd assets, you can use those instead.

### Move crowd with actor

<figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-1da3761711d01723666c87121a2a13099ccb0c17%2FParsec2025-07-0316-58-33-ezgif.com-video-to-gif-converter.gif?alt=media" alt=""><figcaption></figcaption></figure>

Enabling `Move Crowd with Actor` in the NPC Crowd details panel ensures that crowd member transforms are updated whenever the `AM2_NpcCrowd` actor's transform changes. When this occurs, each crowd member's location is recalculated relative to their position in relation to the actor's transform.

When the actor's rotation is updated, the entire crowd rotates as a unified block relative to the actor's transform.

Similarly, when the actor's scale changes, the crowd members spread out or compress collectively, maintaining their relative positions, rather than altering the individual scale of each member.
