How it works
ADS AI System is mainly used by adding the ADS AI System Component to the actor that needs AI logic. In most cases, it is added to a Character or Pawn controlled by an AI Controller.
Once the component is added, configure its settings in the Details panel: enable perception, sight, hearing, filtering of player-controlled Pawns, and optionally the Behavior Tree to start automatically.
At BeginPlay, the component configures AI Perception. It finds or creates the required AI Perception Component, configures the enabled senses, then listens for perception updates sent by Unreal Engine. If a Behavior Tree is defined, it is automatically started through the AI Controller, then the Blackboard is retrieved so it can be read or modified from the component.
When a Pawn is seen, the system triggers the dedicated sight event. If the corresponding Blackboard option is enabled, a Blackboard Bool key can also be set to true, then automatically reset to false after a configurable delay. For example, this lets you use a bSeePawn key in the Behavior Tree to change the AI's state when it sees the player.
When a noise is heard, the system triggers the dedicated hearing event with the instigating Pawn, the noise location, and its volume. For a noise to be detected, a noise event must be properly emitted in the project according to the standard AI Perception workflow.
Perceived changes can be used in two ways: by binding the component's Event Dispatchers, or by creating a Blueprint child of the component and overriding the functions provided for sight, hearing, or raw AI Perception updates.
The component also provides Runtime functions to enable or disable perception, modify sight or hearing settings, change the Behavior Tree, and read or write Blackboard keys. A debug visualization in the editor helps configure origin, offsets, sight radius, and perception angle; it does not replace Unreal Engine's Runtime AI Perception logic.