Telegraphs

Documentation Unreal Engine AI Reactions Perception

Make a montage announce what a character is doing: one notify on the wind-up, 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. 1

    Add the window to the attack montage

    Open the attacker's montage, right-click the notify track where the wind-up starts, Add Notify State, SEC Telegraph Window. Drag it across the wind-up frames, not the frames the blow lands on.
    A fresh window opens on a Sphere reaching 500 cm with Team Filter on Enemies Only, which is already a working warning.
    Tick Find The Attack Automatically too, so the warning carries the tags of the swing that follows, such as SEC.Attack.Heavy. It ships off, and a window left that way carries none of the swing's tags.
  2. 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
    ▾Broadcast
    ShapeSphere
    Radius500
    Half Angle Degrees60
    Radius and Half Angle Degrees sit inside the shape and expand under it. Radius is the reach in centimeters, and Half Angle Degrees is measured to either side of where the attack is aimed.
  3. 3

    Give the enemy something to answer with

    Open the enemy's Reaction Set, add a trigger with On Stimulus set to SEC.Stimulus.AttackTelegraphed, and wire it to a parry reaction. That is the whole receiving end. See Reaction System.
  4. 4

    Play, and watch the warning go out

    Press Play, swing, and run SEC.Debug.Stimulus.Draw 1. The covered ground is drawn at the origin, and every pawn the warning reached gets a colored 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 window works out how long is left by finding the next SEC Melee Trace Window later in the same montage section and dividing the gap by the play rate in force, so retiming the animation keeps it right. With no trace window after the window in its section and Override Time To Impact left off, the warning still goes out and reports 0 seconds left. A window with Find The Attack Automatically ticked also names the montage once in the Output Log. See Melee Trace.
Five stages sit between the wind-up and the answer. The debug draw colors a pawn by the stage it dropped out at, so the diagram below doubles as the map for reading it.
1
Something announces itself
SEC Telegraph Window or SEC Telegraph notify, or Report Area Stimulus from any graph
One announcement carrying the subject, how long is left, and the tags describing what it is.
Drops out here: Nothing yet. A window announces at its first frame, a one-shot at the frame it sits on.
2
Who it reaches
Shape and Team Filter on the broadcast
The pawns standing on the ground the shape covers.
Drops out here: Anyone out of reach, behind the arc, or on the attacker's own side.
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 4 is the one place luck comes in. A rule's Chance at 0.5 leaves roughly half the enemies that noticed without an answer.

Pick the window or the one-shot

NotifyUse it for
SEC Telegraph WindowA stretch of frames: an attack wind-up, or the seconds a stunned character stays open to a finisher. The marker comes down when the window closes, and the tags sit on the character for as long as it runs.
SEC TelegraphOne frame with no natural end: a parry landing, a stagger beginning. Duration Seconds is what bounds the marker, and the tags reach nobody's character state.
Both carry the same Telegraph Type, Tags, Broadcast and Magnitude.

Aim the warning

Shape is the ground the warning covers. Each one asks only for the values it uses, so a swing that warns all round shows no angle to fill in.
ShapeFieldsReach for it
SphereRadius, 500 cm to startA shockwave, a roar, an attack wide enough that facing does not matter.
ConeRadius, plus Half Angle Degrees (60 to start) and Yaw Offset DegreesA directional swing, a thrust, a breath weapon.
Half Angle Degrees is measured to either side of the aim: 45 is a narrow cone straight ahead, 90 covers everything in front, 180 covers all round. Yaw Offset Degrees turns the wedge off center, so 90 puts the reach where a swing coming in from the right goes.
Clear Shape and the announcement describes the character without warning any enemy, and logs nothing; a marker your own code draws for it is not limited by reach. A shape that reaches 0 cm is a mistake instead, and the plugin warns once.
Details
SEC Telegraph Window
Telegraph
Telegraph Type
Damage
Find The Attack Automatically
Attack
None
Tags
0 Gameplay Tags
Origin Socket
blade_start
Magnitude
0
Override Time To Impact
Broadcast
Shape
Cone
Team Filter
Enemies Only
Shape
Radius
600
Half Angle Degrees
45
Yaw Offset Degrees
0
Debug
Draw Debug
Drag it across the wind-up frames. Find The Attack Automatically ships off; tick it to read the damage tags of the next trace window in this montage section. With Override Time To Impact left off the countdown is the measured gap to that window.
FieldSets
Telegraph TypeDamage for an incoming blow, the kind a rule waiting on an attack answers. None for a state the character is in.
Find The Attack AutomaticallyOff by default. Tick it to read the tags off the next swing in this montage section rather than repeating them here. See the next section.
AttackThe attack this describes, shown while Find The Attack Automatically is off, for a montage with no trace window to be found.
TagsWhat the window announces on top of the attack's own tags. The first one is the name a trigger rule matches. A tag describing the blow, such as SEC.Attack.Heavy or SEC.Attack.Unblockable, belongs on the attack the window reads, so the defense sees it too.
Origin SocketSocket the warning radiates from and a marker anchors to. Empty measures from the mesh; name a blade socket on a long weapon so reach starts at the tip.
Team FilterWho gets warned. Enemies Only covers anything not on the attacker's team, so allies are not startled by their own side.
Draw DebugDraw this announcement's covered ground in the world for a moment.
MagnitudeHow big this attack is, in whatever units your project uses. Reaches the reaction's ability as its Magnitude.
Override Time To ImpactSet the countdown by hand instead of measuring it. Tick it for an attack with no trace window to measure against, such as a grab or a projectile launch.
Time To ImpactSeconds until the blow lands, used while Override Time To Impact is ticked, and hidden while it is not.
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.

Say what the window announces

Telegraph Type on Damage describes an incoming blow. Tick Find The Attack Automatically and the window reads the tags off the swing rather than asking you to type them twice. The window looks for the next SEC Melee Trace Window later in its own montage section and takes that window's Extra Damage Tags and its config's Damage Tags, falling back to Default Damage Config on the character's SEC Melee Trace component. In a combo split into montage sections, each swing's window warns about that swing alone. One authored answer feeds both the warning and the Defense response that prices the blow, so a rule cannot parry an attack the damage treats as unblockable.
Leave it off for a montage with no trace window to find, a grab or a projectile launch, and fill in the Attack picker that shows while it is off. Point it at that attack's damage config and its tags describe the warning the same way.
Whatever the window's own Tags carry goes in front of the attack's, so the name you chose stays the name a rule matches. Leave Find The Attack Automatically off and Attack empty, and the announcement is exactly those authored tags, which is a feint: warn the enemy about a heavy overhead, then play a montage that never swings.
A fresh window has Find The Attack Automatically off and Attack empty, so it carries none of the attack's tags. A SEC.Attack.Heavy or SEC.Attack.Unblockable tag on the swing never reaches a trigger rule, a stimulus filter or a parry prompt, and nothing is logged. Tick Find The Attack Automatically or pick an Attack.
Telegraph Type on None announces a state instead, with no attack behind it. A stunned enemy open to a finisher, or a boss whose armor has cracked: drag the window across those frames and fill in the tag. Point a trigger rule at SEC.Stimulus.StanceBroken and an enemy answers a stagger the way another answers a swing.
The window makes either kind readable to the rest of the game. Its tags sit on the character's ability system for as long as it runs and come off when it closes, whether the montage finished, blended out or was interrupted, so a Defense response or a finisher check reads what the character is doing without listening for anything. A window that resolves no tags holds nothing, and a window with Shape cleared still holds its tags while it warns no enemy.
A Damage window whose leading tag is not already under SEC.Stimulus is announced as SEC.Stimulus.AttackTelegraphed, so one carrying only a damage config's tags still answers the rules a project already has. A None window keeps whatever it authored, so a state fires only the rules that name it.

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.
FilterChecks
Facing ConeIs the source somewhere in front. Half Angle Degrees starts at 100, a wide human field of view; 180 turns the filter off.
AwarenessDoes 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 SightCan the enemy see where the warning comes from, so a warning does not travel through a wall. Only the world blocks the view: characters and anything they hold are seen through, and the source counts as seen when the middle, top or bottom of its body is in clear view. A warning whose Origin lies away from its source, such as a spell landing across the room from its caster, is checked at the Origin. Trace Channel starts at Visibility, Eye Height at 0, which uses the pawn's own eye height. A few traces per warning, and warnings are rare.
Each filter carries Bypass on Context Tags: skip this filter when the announcement 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 announcement itself rather than the pawn, so each one belongs in a trigger rule's Conditions or in a reaction's own Scoring.
GateJudgesSet it to
Incoming Angle GateWhich 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 GateHow 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 GateHow 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 GateHow far off the attacker stands, in centimeters. 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.
A gate in a rule's Conditions decides whether this kind of answer is considered at all, and a refusal drops the announcement to the next rule down. A gate in a reaction's Scoring decides whether that reaction is the right one inside a category that already matched, and a refusal leaves the announcement to another reaction in the same category.
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 PriorityRuleConditionsAnswers with
10GuardFrontalIncoming Angle Gate, half angle 60Your defensive category
0FlinchAnythingnoneYour 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 an announcement, 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 a telegraph window reaches, 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
Make Cone Broadcast
Target is SECStimulus Library
Radius700.0
Half Angle Degrees30.0
Yaw Offset Degrees0.0
Team FilterEnemies Only
Return Value
Make SECTelegraph
SubjectSelf
TagsSEC.Stimulus.AttackTelegraphed
Time to Impact0.8
Broadcast
SECTelegraph
Get Velocity
TargetSelf
Return Value
Report Area Stimulus
Target is SECStimulus Library
SourceSelf
Stimulus
Facing
Return Value
Fill the Stimulus pin with Make SECTelegraph. Tags, Magnitude and Time to Impact carry what they carry on a window, and Subject is who the announcement is about: the reaction that answers receives it as its target, so a counter swings at the right pawn, and the subject itself is never warned. Left empty, the Source is the subject. Four pins matter only on this path.
PinCarries
BroadcastHow far it carries and who it reaches. Build it with Make Sphere Broadcast or Make Cone Broadcast.
OriginWhere in the world it came from. Left at zero it falls back to the subject's location.
Duration SecondsHow long a marker raised for this should live.
PayloadAny 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 caster as Subject, its velocity as Facing, and a cone as the shape, and a counter swings at the caster. 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.
  1. Add SEC Stimulus Listener to the player pawn.
  2. Bind On Stimulus Noticed.
  3. Read the payload. Subject is who is attacking, Time To Impact is how long is left, and Tags says whether the attack is unblockable, so the prompt can show red rather than white. The swing's own tags arrive only from a window with Find The Attack Automatically ticked or an Attack picked.
  4. Show the widget above the subject's head, and hide it when Time To Impact runs out.
The player gets no perception filters: 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 announcement yourself when a prompt should stay hidden.
Key the widget by Subject and refresh it rather than spawning a new one. One attacker announces again on the next window 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, colored by what happened and labeled with the outcome. A pawn that answered gets a thicker sphere and an arrow from the origin; every other pawn gets a plain line. 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 labeled with its leading tag and its shape. A Sphere draws a wireframe sphere at full reach; a Cone draws its arc, its two edges and an arrow along the aim.
GrayTeam 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.
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, such as the player.
WhiteNo receiver
Neither a reaction component nor a listener, so the announcement reached a pawn that cannot use it.
Read the colors as a funnel. Gray and blue mean the announcement is mis-shaped: widen the radius or the arc, check the team ids. Red names the filter that refused it. 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 window 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 is cleared. That warns no enemy by design and logs nothing. Pick Sphere or Cone.
  • The shape reaches 0 cm. The plugin warns once here, naming the announcer and the tag.
  • The animation is playing in a preview window. A montage scrubbed in the editor announces nothing, because the notify needs a world.
  • The pawn is not the authority. Warning enemies is a server-side decision, so a montage playing on a client tells nobody. That 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 one of the announcement's tags, or sit above one 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. An announcement 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 window 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.
AlternativeOther ways to report something
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 wind-up, 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.
Report Stimulus To hands a single pawn a single announcement, 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 an announcement, so a reaction you start by hand reaches its ability carrying what an automatic one would: the subject as the target, the leading tag as the event tag, the magnitude, the tags, and the direction packed into target data.
AdvancedWriting a shape of your own
Subclass SEC Telegraph 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 centimeters. 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.
AdvancedReplacing a whole stage
Two overridable events on the Reaction Evaluation component let a project take a stage over outright.
OverrideReplaces
Can Sense StimulusThe whole perception step. The default runs every filter in force and requires all of them to pass.
Select Reaction CategoryThe 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.
C++Drawing your own marker
The notifies announce through a pair of native delegates in the SECTelegraph namespace, which is where a marker system belongs.
DelegateFires
SECTelegraph::OnBegin()When anything announces itself, once per window run, on every machine playing the montage, the dedicated server included.
SECTelegraph::OnEnd()When a window announcement is over, whether it finished, was interrupted, or the montage stopped. A one-shot never fires it, because its own Duration Seconds bounds the marker.
Both delegates outlive any one world, so check that Subject belongs to yours before answering; two Play In Editor sessions in one process share them.
Both the warning and a marker ask FSECTelegraph::Reaches, so a marker cannot appear for a pawn the warning skipped. An announcement with no shape warns nobody and asks for a marker unlimited by reach; Reaches answers false for it, so a marker skips the test when Broadcast.Shape is empty. bAwaitsExplicitEnd says whether an end is coming, so a marker knows to wait rather than time itself out.
Shape Announcement is a virtual on both notifies, called on the announcement before it goes out. Override it in a C++ subclass to fill in what only the attack knows: a magnitude read off a charge level, or an Origin Component on a drawn weapon. It runs on every machine, and what it fills in decides the ground the telegraph covers, so keep render-only work out of it.
MultiplayerMultiplayer
The montage already reaches every machine, so nothing here replicates and the announcement fires everywhere, the dedicated server included. Drawing runs on a machine with a view, which is what lets a client raise its own marker off SECTelegraph::OnBegin(); deciding runs on the authority.
A window announces once for each run of the montage through it, on every machine, and only the server passes the announcement on to enemies, so one swing warns an enemy once.
Warning enemies is the server's job. Report Area Stimulus tells nobody when the source is not the authority, and Report Stimulus To and Receive Stimulus are server side for the same reason, so one swing cannot warn the same enemy twice. The On Stimulus Noticed delegate on a listener therefore fires on the server, and a parry prompt built on it needs that replicated down to the owning client.
The window puts its tags on the character wherever the montage plays, so a client-side check reads the same state the server does.
Clients see the outcome through the reaction ability and its animation, which replicate the way every other ability does. See Multiplayer.

PageWhy
Reaction SystemThe trigger rules and reactions that answer an announcement.
Reaction Set EditorThe canvas the rules and reactions are wired on.
Defense SystemWhat the raised guard is worth once the blow arrives.
Awareness SystemThe perception memory the Awareness filter reads, and the stealth opener it makes possible.
Melee TraceThe trace window a telegraph measures its time to impact and its tags against.
Animation IntegrationThe rest of the montage surface, including the windows that hold a defensive state tag.