Goal

Use an Event branch when a reaction should begin because something happened, without polling in the main Start branch.

Tree structure

An On Received Event branch faces the event source and plays a reaction.

How it runs

In the editor, add On Received Event as an Event task and give it the same event name used by the sender. Connect a Sequence containing the actions that should run in response. In this example, the agent first faces the event source and then plays its reaction.

When a matching event arrives, it starts the response Sequence while the ordinary Start branch can continue independently. On Received Event and Sequence are built-in tasks; Face Event Source and Play Reaction represent game-specific actions such as turning, playing an animation or sound, or changing state.

Variations

Use Send Event from the Actions reference when another behavior tree should trigger the reaction. Use Has Received Event from the Conditionals reference when the event should be checked as part of normal Selector flow instead of starting an independent branch.

Tasks used in this tree

On Received Event in the Events reference, Send Event in the Actions reference, Has Received Event in the Conditionals reference, and Sequence.