Skip to content

Triggering Events

External gameplay code drives animations by broadcasting events into a VA Mesh Component. Every State Tree using that component receives the event, and any state currently listening for the matching tag transitions in response.

This page covers the three things you need to know:

  1. How to declare event tags.
  2. How to broadcast an event from Blueprints.
  3. How events route through the VA system.

Gameplay tags are Unreal’s hierarchical naming system. They’re reusable across the whole project. One tag can drive many State Trees.

  1. Open Project Settings → Project → Gameplay Tags.
  2. Click Add New Gameplay Tag.
  3. Enter your tag. For example Mannequin.Wave or SoccerFan.Goal.
  4. Save. The tag is now available everywhere.

Use dot-separated namespaces to group related tags (Mannequin.Wave, Mannequin.Cheer, Mannequin.Confused). See Transitions. Tag inheritance for how the hierarchy lets you write broad handlers.

All events enter the VA system through Broadcast Anim Event, called on a VA Mesh Component (or VA Instanced Mesh Component).

PinTypeDescription
TargetVA Mesh ComponentThe component to broadcast on. For instanced crowds, every instance using this component hears the event.
Event TagGameplay TagThe tag to broadcast. Use a Make Literal Gameplay Tag node or a tag variable.
Instance Filter (optional)Array of instance handlesIf provided, only those instances receive the event. Leave empty to broadcast to all.

The canonical setup: when the player steps into a box, tell an NPC to wave.

  1. Drop a Trigger Box into the level.
  2. Open the Level Blueprint and select the Trigger Box in the Outliner.
  3. Right-click in the graph → Add Event → On Actor Begin Overlap.
  4. Off the Other Actor pin, Cast To your player class.
  5. Get a reference to your BP_VA_NPC (from the level or via Get Actor Of Class).
  6. Off that reference, call Get VA Mesh → returns the Vertex Animation Mesh Component.
  7. Off the component, call Broadcast Anim Event with Event Tag = Mannequin.Wave.

The same API broadcasts to an entire crowd. Every instance painted with the same State Tree receives the event simultaneously.

Pattern: goal celebration: A scoring Blueprint calls BroadcastAnimEvent(CrowdComponent, SoccerFan.Goal). Every fan’s State Tree transitions from Idle to Cheer. Because the VA update pipeline batches instance updates, thousands of instances react in the same frame with negligible per-instance cost.

Pass an array of instance handles to BroadcastAnimEvent to limit the broadcast. Common sources of instance handles:

  • The Crowd Editor selection (see Editor Mode Overview) for authored scenarios.
  • Spatial queries like Get Instances In Radius for proximity-based effects.
  • Custom per-instance data - for example, only instances with a particular team tag.

The C++ entry point lives in UVAStateTreeFunctionLibrary. The Blueprint nodes wrap these same functions; use them directly in native code:

// Broadcast to every instance on the component
UVAStateTreeFunctionLibrary::BroadcastAnimEvent(
VAMeshComponent,
FGameplayTag::RequestGameplayTag(TEXT("Mannequin.Wave"))
);
// Broadcast to a specific subset
UVAStateTreeFunctionLibrary::BroadcastAnimEventToInstances(
VAMeshComponent,
InstanceHandles,
WaveTag
);

When thousands of instances respond to the same event, you can reduce the per-event cost with the options in the VA StateTree Schema:

  • Filter Animation Events - restrict which tags are dispatched to the tree at all.
  • Throttle Events - spread the per-instance dispatch across multiple frames when one event fires on many instances at once (for example, a goal event broadcast to every fan in a stadium).

See Schema & Settings for configuration details.