AI Enemy System Guide 中文

Modules

One card per module: what it is, where it goes, the settings you change most and the nodes you use most. Numbers are C++ defaults; trust the Details panel.

Updated 2026-11-18

Guard#

AAIEnemy · /Game/Benjamin-AI/Enemy/Guard

What it is

Perceives the player, tracks Awareness and alert state, and handles capture, knockout and death.

Where it goes

Drag the Guard Blueprint into a level

Key settings
SettingDefaultWhat it does
Sight Range1500 cmSight range in the light
Sight Angle45°Cone half-angle
Awareness Gain Rate1.0 /sHow fast Awareness rises in sight
Capture Range150 cmCapture distance while Alerted
Patrol Points—Patrol point list
Draw DebugOffDraws the cone, clues and status text
Key nodes
Event On Player CapturedEvent On Alert State ChangedShare AlertReport KilledTake PunchSteal EmotionPacifyReset Perception

Behavior controller#

AAIEnemyController

What it is

Patrols, investigates, searches, chases and returns based on the alert state.

Where it goes

Possesses guards automatically. To change its defaults, make a Blueprint based on AIEnemyController and set it as the guard's AI Controller Class.

Key settings
SettingDefaultWhat it does
Search Radius400 cmRadius for picking search points
Search Duration8 sMinimum search time
Retarget Distance150 cmHow far a new clue must be to change course
Behavior PausedOffPauses behavior, for cutscenes
Key nodes
Request InvestigateReturn To PatrolReset BehaviorForce StateClear Forced State

Enemy subsystem#

UAIEnemySubsystem

What it is

Sends sounds, holds evidence, answers light queries, finds witnesses, relays score events and finds guards by radius.

Where it goes

One per level, automatically; any Blueprint gets it with Get AIEnemySubsystem

Key settings
SettingDefaultWhat it does
Belief Per Kill0.5Belief per witnessed kill
Belief Per Emotion Stolen0.2Belief per witnessed steal
Extra Witness Factor0.5Bonus per extra witness
Key nodes
Report Sound AtReport Evidence AtReport Witnessable Event AtForce State In RadiusSet Lights In RadiusGet Enemies In RadiusIs Location DarkOn Ghost Score Event

AI Light#

UAILightComponent

What it is

Marks where it can get dark, and leaves evidence for guards to check when the light goes out.

Where it goes

The lamp actor, ideally on BP_LightParent

Key settings
SettingDefaultWhat it does
Radius0Dark-area radius; 0 uses the attenuation radius
Investigate When Turned OffOnGuards check when it goes out
Evidence Lifetime15 sHow long the evidence lasts
Start OnOnInitial state with no light component
Draw DebugOffDraws the circle on the floor
Key nodes
Turn OnTurn OffToggleSet Light OnIs Light OnOn Light Changed

AI Evidence#

UAIEvidenceComponent

What it is

Reports “item missing” when the item is destroyed; can also report and retract by hand.

Where it goes

Items that can be taken

Key settings
SettingDefaultWhat it does
Evidence TypeItem MissingEvidence type
Notice Radius1200 cmHow far away it can be noticed
Require Line Of SightOnMust be seen to count
Report When Owner DestroyedOnReport automatically when destroyed
Lifetime0Seconds it lasts; 0 means permanent
Key nodes
Report ChangeReport Change AtReport Change Of TypeRetract Last Change

Stealth Noise#

UStealthNoiseComponent

What it is

Every noise the player makes: footsteps, actions, interactions. It never makes noise by itself; Blueprints call it.

Where it goes

The player (already on BP_ThirdPersonCharacter in the formal project)

Key settings
SettingDefaultWhat it does
Walk Noise Radius500 cmWalking
Sprint Noise Radius1400 cmSprinting
Crouch Noise Radius0Crouching; 0 means silent
Noise Wall Attenuation0.5Fraction lost at each wall
Draw DebugOffDraws noise rings
Key nodes
Make Walk NoiseMake Sprint NoiseMake Crouch NoiseMake Movement NoiseMake NoiseGet Noise Radius

Emotion#

UEmotionComponent

What it is

The guard's current emotion, the flicker on change, and the cooldown after a steal.

Where it goes

Built into every guard, as the component named Emotion

Key settings
SettingDefaultWhat it does
Emotion Change Time1 sFlicker before switching
Emotion Reset Time3 sTime back to Calm with no condition met
Emotion Suppress Time10 sCooldown after a steal
Initial EmotionCalmStarting emotion
Rules2 rulesRule table; both defaults produce Angry
Key nodes
Get Display ColorTurn On AngryTurn On FearTurn On JoySet Custom FlagForce EmotionOn Emotion Changed

Decision#

UEnemyMLDecisionComponent

What it is

Where to go without sight of the player: the next search point and the hunt target. Only the rule version runs today.

Where it goes

Built into every guard, as the component named Decision

Key settings
SettingDefaultWhat it does
Decision ModeRuleRule or ML; falls back to Rule when ML is unavailable
Draw DebugOffDraws the latest decision point
Key nodes
Choose Search PointChoose Hunt PointIs ML AvailableGet Active ModeOn Decision Made

Stealth Move Package#

UStealthMovePackage

What it is

Crouch and sprint, camera zoom, kill, steal emotion, invisibility, and the T and L test keys.

Where it goes

The player (optional; not on the formal project's player)

Key settings
SettingDefaultWhat it does
Kill Range180 cmE-key kill distance
Steal Range180 cmF-key steal distance
Invisibility Duration0V-key duration; 0 means until pressed again
Light Toggle Range1500 cmL-key light toggle range
Key nodes
Try KillTry Steal EmotionSet InvisibleTest Force FightTest Toggle Nearest LightGet Move State

Ghost Score#

UGhostScoreComponent

What it is

Turns guard events into points and prints them; the values are placeholders.

Where it goes

The player or any actor in the level (optional)

Key settings
SettingDefaultWhat it does
Starting Score1000Starting score
Points Spotted Player-10Spotted
Points Detected Player-50Detected and chased
Points Guard Dead-100Guard killed
Print Score ChangesOnPrint each change on screen
Key nodes
Add ScoreReset ScoreGet ScoreGet Points For EventOn Score Changed

ML training tools#

EnemyML Arena · Player Bot · Evaluator · Training Game Mode

What it is

The arena, bot player and statistics for training and evaluating ML decisions. Normal levels don't need them.

Where it goes

Training maps only