Attack Telegraphs
Documentation Unreal Engine AI Reactions Perception
Make an attack announce itself at the wind-up: one notify on the montage, and the enemies standing in front of it get a chance to parry, dodge or stand their ground.
A blade touches an enemy hundredths of a second before it hurts them, far too late to raise a guard. One notify on the wind-up warns everything standing in front of it instead.
Set it up
30 seconds- 1
Add the notify to the attack montage
Open the attacker's montage, right-click the notify track where the wind-up starts, and pick SEC Attack Telegraph. Put it at the wind-up, not at the blow.A fresh notify opens on a Sphere reaching 500 cm with Team Filter on Enemies Only, which is already a working warning. - 2
Aim it at where the blade goes
Switch Shape to Cone for a directional swing, then expand the shape and set Radius to the attack's reach and Half Angle Degrees to the wedge it threatens.AM_Greatsword_Overhead▾TelegraphShapeSphereRadius500Half Angle Degrees60Radius and Half Angle Degrees sit inside the shape and expand under it. Radius is the reach in centimetres, and Half Angle Degrees is measured to either side of where the attack is aimed. - 3
Give the enemy something to answer with
Open the enemy's Reaction Set, add a trigger with On Stimulus set toSEC.Stimulus.AttackTelegraphed, and wire it to a parry reaction. That is the whole receiving end. See Reaction System. - 4
Play, and watch the warning go out
Press Play, swing, and runSEC.Debug.Stimulus.Draw 1. The covered ground is drawn at the origin, and every pawn the warning reached gets a coloured sphere: green means it answered.
An enemy whose Reaction Set carries no trigger rule for the warning's name hears it and does nothing. The announcement goes out, the debug draw marks that enemy yellow, and no error is logged. Fill in Trigger Rules on the set the enemy is running.
The notify works out how long is left by finding the next SEC Melee Trace Window further along the montage and dividing by the play rate in force, so retiming the animation keeps it right. With no trace window after the notify and no Time To Impact Override, the warning still goes out, reports 0 seconds left, and names itself once in the Output Log. See Melee Trace.
Five stages sit between the wind-up and the answer. The debug draw colours a pawn by the stage it dropped out at, so the diagram below doubles as the map for reading it.
1
The attack announces itself
SEC Attack Telegraph notify, or Report Area Stimulus from any graph
One announcement carrying the attacker, how long is left, and what kind of attack it is.
Drops out here: Nothing yet. The announcement fires once, at the instant the notify sits on.
2
Who is in danger
Shape, Team Filter, Notice Chance
The pawns standing inside the wedge, minus the ones the notice roll missed.
Drops out here: Anyone out of reach, behind the arc, on the attacker's own side, or unlucky on the roll.
3
Did this one notice
Stimulus Filters on the receiver's Enemy AI Config
The enemies that could have seen it coming.
Drops out here: Back turned, has not spotted the attacker yet, a wall in between.
4
What kind of answer
Trigger Rules on the receiver's Reaction Set, asked in Rule Priority order, highest first
A reaction category: defensive, aggressive, whatever the rule names.
Drops out here: No rule matched the tags, the rule's Chance failed, or its Min Interval has not run out.
5
Which reaction runs
The usual reaction scoring inside that category
One reaction, which starts its ability.
Drops out here: Nothing in the category passed its gates, so the enemy takes the hit.
Stage 2 and stage 4 each roll their own dice. Set both to 0.5 and roughly a quarter of the enemies in the arc answer.
Aim the warning
Shape is the ground the warning covers. Two ship, and each asks only for the values it uses, so a swing that warns all round shows no angle to fill in.
| Shape | Fields | Reach for it |
|---|---|---|
| Sphere | Radius, 500 cm to start | A shockwave, a roar, an attack wide enough that facing does not matter. |
| Cone | Radius, plus Half Angle Degrees (60 to start) and Yaw Offset Degrees | A directional swing, a thrust, a breath weapon. |
Half Angle Degrees is measured to either side of where the attack is aimed: 45 is a narrow cone straight ahead, 90 covers everything in front, 180 covers all round. Yaw Offset Degrees turns the wedge away from straight ahead, so set it to 90 for a swing coming in from the right and the warning covers where the blade goes.
A broadcast left with no shape at all warns nobody and says so in the Output Log.
Details
SEC Telegraph
Telegraph
Shape
Cone
Team Filter
Enemies Only
Notice Chance
0.80
Draw Debug
Origin Socket
blade_start
Time To Impact Override
0
Telegraph Tag
SEC.Stimulus.AttackTelegraphed
Context Tags
1 Gameplay Tag
SEC.Attack.Heavy
Magnitude
0
Shape
Radius
600
Half Angle Degrees
45
Yaw Offset Degrees
0
Placed on the montage where the wind-up starts. Time To Impact Override at 0 lets the notify measure the gap to the next trace window itself.
| Field | Sets |
|---|---|
| Team Filter | Who gets warned. Enemies Only covers anything not on the attacker's team, so allies are not startled by their own side. |
| Notice Chance | How likely each pawn in range is to notice, 0 to 1. Starts at 1. |
| Draw Debug | Draw this one announcement's covered ground in the world for a moment. |
| Origin Socket | Socket the warning radiates from. Empty measures from the actor; name a blade socket on a long weapon so reach starts at the tip. |
| Time To Impact Override | Seconds until the blow lands, for an attack with no trace window to measure against, such as a grab or a projectile launch. 0 lets the notify measure it. |
| Telegraph Tag | What to call this warning, which is what a trigger rule matches. Starts at SEC.Stimulus.AttackTelegraphed. |
| Context Tags | Extra tags describing this attack, such as SEC.Attack.Heavy or SEC.Attack.Unblockable, so a rule can require or refuse them. |
| Magnitude | How big this attack is, in whatever units your project uses. Reaches the reaction's ability as its Magnitude. |
Author a child tag under
SEC.Stimulus.AttackTelegraphed for an attack that needs its own answer. A rule written on the parent still catches it, so adding SEC.Stimulus.AttackTelegraphed.Heavy costs the existing rules nothing.Make a crowd react raggedly
Notice Chance rolls once for each pawn the shape covers. At 0.6, roughly three enemies in five spot the wind-up and the rest are caught out, which is what stops four enemies parrying the same swing in unison.
A trigger rule's own Chance is a second, separate roll at the answering end, and the two multiply. Set both to 0.5 and roughly a quarter of the enemies in the arc react.
Reach for Notice Chance when a group moves as one mind, and for Chance when a single enemy answers too often.
A pawn with no team id counts as neutral, and Enemies Only lets neutrals through. Copy the shooter's team id onto a spawned projectile, or its warnings reach your own side along with the target.
Say what an enemy is able to notice
Stimulus Filters on the enemy's Enemy AI Config are the reasons it might miss a wind-up. A warning has to clear all of them, and an empty list notices everything, including a swing behind the enemy's back.
Details
DA_KnightAIConfig
Awareness
Stimulus Filters
3 Array elements
Facing Cone
Half Angle Degrees
100
Bypass On Context Tags
1 Gameplay Tag
SEC.Attack.Unblockable
Awareness
Minimum State
Detected
Bypass On Context Tags
0 Gameplay Tags
Line of Sight
Trace Channel
Visibility
Eye Height
0
Bypass On Context Tags
0 Gameplay Tags
Every filter has to pass before the enemy considers answering. An empty list notices everything, including a swing behind its back.
| Filter | Checks |
|---|---|
| Facing Cone | Is the source somewhere in front. Half Angle Degrees starts at 100, a wide human field of view; 180 turns the filter off. |
| Awareness | Does the enemy already know about the source. Minimum State starts at Detected, so only an enemy watching the attacker answers its wind-up; Suspicious lets one that has merely heard something answer too. This is the stealth opener. Needs an Awareness component on the controller; without one the filter passes and warns once. |
| Line of Sight | Is there a clear line, so a warning does not travel through a wall. Trace Channel starts at Visibility, Eye Height at 0, which uses the pawn's own eye height. One trace per warning, and warnings are rare. |
Each filter carries Bypass On Context Tags: skip this filter when the warning carries any of these. Put
SEC.Attack.Unblockable there and a roar loud enough to notice regardless gets through a facing cone that would otherwise refuse it. A parent tag matches its children.Match the answer to the blow
Four gates read the warning itself rather than the pawn, so each one belongs in a trigger rule's Conditions or in a reaction's own Scoring.
| Gate | Judges | Set it to |
|---|---|---|
| Incoming Angle Gate | Which side the blow arrives from. Half Angle Degrees starts at 60. | The arc the guard covers, so a parry cannot answer a swing from behind. |
| Time To Impact Gate | How long is left. Min Seconds and Max Seconds, 0 for no bound. | Min Seconds at the parry's own start-up, so the enemy stops trying to beat a swing already too close. |
| Stimulus Magnitude Gate | How big it is, in whatever the producer measured. Min Magnitude and Max Magnitude. | A ceiling on the flinch rule and a floor on the stagger rule, so a light hit and a heavy one split. |
| Source Distance Gate | How far off the attacker stands, in centimetres. Min Distance and Max Distance. | Max Distance at a counter's own range, so the enemy stops swinging back at an archer across the room. |
The two placements read differently:
| Placed in | Decides | A refusal means |
|---|---|---|
| A rule's Conditions | Whether this kind of answer is considered at all | The next rule down takes the warning |
| A reaction's Scoring | Whether this reaction is the right one inside a category that already matched | Another reaction in the same category takes it |
Reach for the rule when nothing in the category can help. A blow landing from behind is one of those: a guard raised against it stops nothing, because the Defense component measures its own arc when the damage lands and refuses the block. Gate the rule and write a second rule under it.
| Rule Priority | Rule | Conditions | Answers with |
|---|---|---|---|
| 10 | GuardFrontal | Incoming Angle Gate, half angle 60 | Your defensive category |
| 0 | FlinchAnything | none | Your stagger category |
A frontal blow takes the first rule and gets the guard. A blow from behind fails its condition, falls through, and gets a flinch. Match the gate's Half Angle Degrees to the arc on the matching Defense response so the decision and the damage agree.
Nothing hands an action a warning, so one of these four gates added to an action has nothing to judge and passes. Saving the Action Set raises a data validation error naming the gate and telling you to move it. They belong on the reaction side.
Announce without a montage
Report Area Stimulus is the same call the notify makes, available from any event graph. Reach for it for a projectile, a grab, a spell going off, or a scripted moment.
BP_Fireball · Event BeginPlay
Get Velocity
TargetSelf
Return Value
Report Area Stimulus
Target is SEC Stimulus Library
SourceSelf
Stimulus
Broadcast
Facing
Return Value
Build the Broadcast pin with Make Sphere Broadcast or Make Cone Broadcast, which take the same reach, team filter and notice chance the notify carries. Fill the Stimulus pin with what happened:
| Pin | Carries |
|---|---|
| Stimulus Tag | What happened, which is what a trigger rule matches. |
| Source | Who produced it. The reaction that answers receives it as its target, so a counter swings at the right pawn. |
| Origin | Where in the world it came from. Left at zero it falls back to the source actor's location. |
| Magnitude | How big it is, in units of your choosing. |
| Time To Impact | Seconds until the blow is expected to land. |
| Context Tags | Extra tags a rule can require or refuse. |
| Payload | Any object to hand along, such as the weapon or the projectile. Cast it in Blueprint. |
A fireball warns what is in front of it on spawn: pass the projectile as Source, its velocity as Facing, and a narrow cone as the shape. Facing is an advanced pin, so expand the arrow at the bottom of the node to reach it. Left at zero it falls back to the source actor's forward vector.
The node returns how many pawns were told, which is worth printing while tuning a radius. Direction is filled in per pawn as the warning goes out, so an Incoming Angle Gate reads it without any setup.
A parry prompt for the player
The player wants the warning without any of the AI machinery behind it.
- Add SEC Stimulus Listener to the player pawn.
- Bind On Stimulus Noticed.
- Read the payload. Source is who is attacking, Time To Impact is how long is left, and Context Tags says whether the attack is unblockable, so the prompt can show red rather than white.
- Show the widget above Source's head, and hide it when Time To Impact runs out.
The player gets no perception filters by design, because the player's eyes are the camera. The delegate fires for each announcement that reaches the pawn with nothing filtered out first, so branch on the warning yourself when a prompt should stay hidden.
Key the widget by Source and refresh it rather than spawning a new one. One attacker announces again on the next notify in a combo, and each announcement carries its own Time To Impact. Treat repeats as updates.
Debug it
SEC.Debug.Stimulus.Draw 1
Draws the ground the announcement covers at its origin, then one sphere at every pawn it reached, coloured by what happened and labelled with the outcome. A pawn that answered gets a thicker sphere and an arrow from the origin; every other pawn gets a plain line. A Cone draws its arc and an arrow along the aim, while a Sphere draws its reach and no facing. Markers last two seconds, and the same lines go to the Output Log.
Orangethe announcement
The ground the announcement covers, drawn at its origin and labelled with the tag, the shape and the notice chance. A Sphere draws a wireframe sphere at full reach; a Cone draws its arc, its two edges and an arrow along the aim.
GreyTeam filtered
The team filter refused this pawn, which is what keeps an attack from startling its own side.
BlueOutside shape
In range but off the ground the shape covers. Widen the shape, or turn a cone with its yaw offset.
MagentaNotice roll failed
The announcement's Notice Chance dropped this pawn before its own perception ran.
RedNot noticed
One of the receiver's Stimulus Filters refused it. The label names which filter.
YellowNo reaction
Noticed, and nothing answered. The label says why: no trigger rule matched, or nothing in the category passed its gates.
GreenReacted
A reaction started, and the label names it.
CyanListener only
A pawn carrying a Stimulus Listener and no reaction component, which is the player.
WhiteNo receiver
Neither a reaction component nor a listener, so the announcement reached a pawn that cannot use it.
Read the colours as a funnel. Grey, blue and magenta mean the announcement itself is mis-shaped: widen the radius or the arc, check the team ids, raise the notice chance. Red means the receiver's own perception refused it, and the label names the filter. Yellow means the enemy noticed and had no answer, which points at the trigger rules or at the gates on the reactions in that category.
Draw Debug on one notify turns the same drawing on for that announcement alone. The console variable forces it on for all of them.
AdvancedNothing is going out at all
- The shape has no reach. A broadcast with no shape, or one reaching 0 cm, warns nobody and logs a line naming the attack.
- The animation is playing in a preview window. The notify returns early outside a game world, so scrubbing the montage in the editor announces nothing.
- The pawn is not the authority. A montage playing on a client announces nothing, which is what stops one swing warning the same enemy twice.
- The receiver is attached to the attacker. A pawn carried by or parented to the source is skipped, along with the source itself.
AdvancedIt reaches the enemy and the enemy does nothing
Follow the label on the yellow marker.
- No trigger rule matched. The rule's On Stimulus has to match the warning's name, or sit above it as a parent tag.
- Nothing in the category was available. Every reaction in the named category was on cooldown, blocked by a tag, or refused by its own gates.
- A Time To Impact Gate refused it. A warning that reports 0 seconds left fails any Min Seconds above 0. That is the gate doing its job on a hit that already landed, and a mistake on a notify sitting past the montage's last trace window, which reports 0 seconds left and reaches every gate that way.
- Min Interval has not elapsed. The gap is counted from the moment the rule last started a reaction.
AlternativeAnswering a hit that already landed
Report Damage Taken Stimulus covers the other half of the story: a flinch or a counter after a blow connects. Call it from the pawn's Handle Incoming Damage once the damage is resolved, and it reads the direction the blow came from off the damage info.
Leave Stimulus Tag empty for
SEC.Stimulus.DamageTaken. A trigger rule on that tag answers it the way another rule answers a telegraph, so a flinch reaction and a parry reaction sit side by side in one Reaction Set.Resolve Enemy Damage does the whole job in one call: run the blow through the pawn's Defense component, take what got through off its vitals, then report the outcome to combat awareness and to AI perception. Make Stimulus From Damage packages the same thing without reporting it, for a graph that wants to change a field before handing it on.
AdvancedWriting a shape of your own
Subclass SEC Stimulus Shape in Blueprint for ground the built-in shapes cannot describe, such as a corridor or a ring. Answer three events:
- Get Max Reach returns how far the shape can possibly reach, in centimetres. Nothing beyond it is looked at, so return the distance to the farthest corner rather than an average. A shape returning 0 warns nobody.
- Covers Receiver decides whether one pawn stands on the covered ground. Everything handed to it already sits inside Get Max Reach, so a shape filling its whole reach can leave this alone.
- Draw Shape outlines the ground for the debug view. Feed its World Context Object input into the same pin on every Draw Debug node used inside, not a Self node; the shape can belong to no world, and wiring Self then draws nothing. Left alone, the base draws a sphere at full reach, which is the outer bound rather than what Covers Receiver accepts.
One shape instance answers for every pawn a warning reaches, and a notify is shared by every montage carrying it, so keep a subclass free of stored state.
AdvancedStamping the warning from the attack itself
Build Stimulus on the notify is overridable in Blueprint. Override it to work out a magnitude or extra context tags from the attack as it runs, such as a charge level held on the character, rather than authoring fixed values on the notify.
Time To Impact arrives already measured off the montage, so an override that wants the measured value passes it through unchanged, and one that knows better replaces it.
AdvancedReplacing a whole stage
Two overridable events on the Reaction Evaluation component let a project take a stage over outright.
| Override | Replaces |
|---|---|
| Can Sense Stimulus | The whole perception step. The default runs every filter in force and requires all of them to pass. |
| Select Reaction Category | The whole rule walk. Return a category tag to route an announcement your own way without authoring rules. |
On Stimulus Received fires before the rule walk. Call Execute Reaction from there and the rules sit that announcement out, because a rule fires only when nothing already answered.
Fallback Stimulus Filters on the component covers a pawn running without an AI Config. A config listing any filters replaces that list outright rather than adding to it.
Writing a filter or a condition of your own is a Blueprint subclass either way: SEC Stimulus Filter answers Can Sense, and SEC Gate answers Passes Gate with the pawn, the target and whatever set it off. A rule's Conditions take the same gate class an action or a reaction takes, so one gate you write serves all three. Keep both stateless, since every AI using the asset shares one instance.
AlternativeTelling one pawn directly
Report Stimulus To hands a single pawn a single warning, skipping the area sweep. An AI runs its perception filters and then its trigger rules; a pawn carrying a Stimulus Listener gets the plain notification.
Make Execution Context From Stimulus fills an execution context from a warning, so a reaction you start by hand reaches its ability carrying what an automatic one would: the source as the target, the warning's name as the event tag, the magnitude, the context tags, and the direction packed into target data.
MultiplayerMultiplayer
Report Area Stimulus reports nothing when the source is not the authority, and the notify returns early on any machine that is not the server. A montage playing on a client announces nothing, so one swing cannot warn the same enemy twice.
Report Stimulus To and Receive Stimulus are server side for the same reason. The On Stimulus Noticed delegate on a listener therefore fires on the server, so a true multiplayer parry prompt needs that replicated down to the owning client.
Clients see the outcome through the reaction ability and its animation, which replicate the way every other ability does. See Multiplayer.
Related
| Page | Why |
|---|---|
| Reaction System | The trigger rules and reactions that answer a warning. |
| Reaction Set Editor | The canvas the rules and reactions are wired on. |
| Defense System | What the raised guard is worth once the blow arrives. |
| Awareness System | The perception memory the Awareness filter reads, and the stealth opener it makes possible. |
| Melee Trace | The trace window the notify measures its time to impact against. |
| Animation Integration | The rest of the montage surface, including the windows that hold a defensive state tag. |