How to Add Interactions
Last updated
Last updated
This page covers how to use the features of Procedural NPC Crowds in Blueprints.
To add interactions to your crowds, follow these steps:
Open the behavior tree asset found in the demo content.
Behavior trees execute from left to right, you can see their execution order with the number assigned to them.
Use the "Perform Action" node, which has 32 unique actions, to have the NPC character running the behavior tree execute custom code.
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.
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.
That's it. It's up to you to add what you want your NPCs to do.