Quick Start¶
Get a working NPC in 5 steps.
1. Create the AI Controller Blueprint¶
- Right-click in Content Browser → Blueprint Class
- Search for parent:
AxMAIController - Name it
BP_MyAIController - Open it → find the StateTreeAI component → assign a StateTree asset
Tip
The plugin includes a sample StateTree (ST_AxM_Master) you can use as a starting point. For a custom tree, see the StateTree Setup guide.
2. Create the NPC Character Blueprint¶
- Right-click → Blueprint Class → parent: Character
- Name it
BP_MyNPC - Configure:
- Mesh: Assign a Skeletal Mesh
- Animation: Set an Animation Blueprint
- Character Movement: Enable Use Acceleration for Paths
- AI Controller Class: Set to
BP_MyAIController - Auto Possess AI: Set to
Placed in World
3. (Optional) Create a Config Data Asset¶
- Right-click → Miscellaneous → Data Asset
- Select
AxMConfigas the class - Name it
DA_MyArchetype - Tune perception ranges, movement speeds, engagement range, leash radius, etc.
- Assign it to your AI Controller Blueprint's Config property
Note
Without a Config asset, the AI Controller uses its built-in default values. The Config asset lets you create distinct archetypes (cautious sniper, aggressive rusher) without touching code.
4. (Optional) Set Up a Patrol Route¶
- Place an
AxMPatrolRouteactor in your level - Edit the spline component to add waypoints
- Select your NPC instance → set Patrol Route to the placed route
5. Place and Play¶
- Drag your NPC Blueprint into the level
- Position it on the NavMesh
- Press Play
Expected behavior:
- NPC patrols between waypoints (if a route is assigned) or idles
- Walk into sight range → NPC chases you
- Stand still → NPC attacks when in engagement range
- Run away → NPC pursues, then searches your last known location
- Leave sight range during combat → NPC searches, then returns to patrol