Convai Dynamic Context in Unreal Engine: Build AI Characters with Live Game State & Scene Awareness

Hello everyone,

We are excited to share a comprehensive step-by-step tutorial on Convai Dynamic Context in Unreal Engine!

In this video, we build a shooting-range AI instructor in UE5 that reacts to player actions in real time—tracking shots fired, observing gaze attention, identifying moving targets, and evaluating player accuracy across 5m, 10m, 15m, and 20m targets.

:sparkles: The 3 Levels of AI Scene Awareness

This tutorial breaks down Dynamic Context into three distinct levels of awareness so you can make your AI NPCs respond to live gameplay context instead of scripted dialogue:

  1. :hammer_and_wrench: Manual Awareness (Events & States):

    • Programmatically send event updates using Invoke Speech, Add Context Event, Set Context State, and Get Context State.

    • Trigger welcoming messages, react when the player picks up a weapon, aggregate context events, and silently track shots fired.

  2. :eye: Automatic Awareness (Convai Objects):

    • Tag scene objects using Convai Object components.

    • Enable spatial relationships, gaze attention tracking, and the ability to identify nearby objects, moving targets, and direction of movement.

  3. :gear: Semi-Automatic Awareness (Tracked Properties):

    • Automatically notify the character when specific Blueprint properties change using Tracked Properties.

    • Track target Hit Count properties dynamically across multiple distance ranges so the instructor can reason about player accuracy based on actual level data.

:magnifying_glass_tilted_left: Runtime Debugging: We also show how to use the Dynamic Context Debug Overlay to inspect the exact events, context states, and property updates being fed into your character at runtime.

:link: Resources & Documentation

Ready to give your AI NPCs true situational awareness? Check out the project links and documentation below:

We would love to see how you implement Dynamic Context in your games, simulations, and virtual training environments. Share your questions or progress in the replies below!

Happy developing!