How to Add Interactions

This page covers how to use the features of Procedural NPC Crowds in Blueprints.

How to add interactions for your NPC:

To add interactions to your crowds, follow these steps:

  1. Open the behavior tree asset found in the demo content.

  2. Behavior trees execute from left to right, you can see their execution order with the number assigned to them.

  3. Use the "Perform Action" node, which has 32 unique actions, to have the NPC character running the behavior tree execute custom code.

This sends a event to the NPC to let you write custom fire and forget logic for them
  1. In your NPC character class under the class settings button, add the NPCAction Interface if it's not there already; the demo content includes it.

Click to zoom in
  1. Once the action interface is integrated with your AI character, go to the event graph and search for Event NPC Action[Number]. Once you have that, you can set up montages, attacks, dialogue, and anything else you want them to do. I recommend integrating with a "do once" if it's executed often.

This simulates a crowd talking to each other.
  1. That's it. It's up to you to add what you want your NPCs to do.

Last updated