Detailed usage

BP_DirectionalTrigger

Placement and role

Place BP_DirectionalTrigger in the level. It is the ready-to-use Blueprint implementation of ADS Directional Trigger. Rotate it to match the directions used in your scene: red and blue follow its forward/backward axis; green and yellow follow its right/left axis.

Components

NameDetailed description
BoxTriggerCentral area that triggers events when the tracked actor enters or exits.
BoxInitInInner tracking area that records movement before the central area is crossed.
BoxInitOutLarger outer tracking area that starts tracking the actor before it enters.
ArrowRedIn, ArrowBlueIn, ArrowGreenIn, ArrowYellowInEditor markers for recognised entry directions.
ArrowRedOut, ArrowBlueOut, ArrowGreenOut, ArrowYellowOutEditor markers for recognised exit directions.

Instance settings

NameDetailed description
Trigger CasesCases to handle. Add one case per required direction/phase combination, then add one or more actions. An event can only be present once.

Functions

NameDetailed description
Set Trigger Box ExtentSets the central area half-size and refreshes tracking areas and markers.
Get Trigger Box ExtentReturns the current central area half-size.
Refresh Directional Trigger PreviewRefreshes areas and arrows in the editor.
Get Direction From World VectorConverts a movement vector to trigger-local direction and returns its match score.
Should Accept ActorReports whether an actor matches the trigger filter.
Get Trigger Event From Direction And PhaseConverts a horizontal direction and In/Out phase into an event.

Dispatchers

NameDetailed description
On Directional TriggeredFires for every recognised crossing and provides complete event data.
On Red In, On Blue In, On Green In, On Yellow InFire when the actor enters through the matching colour.
On Red Out, On Blue Out, On Green Out, On Yellow OutFire when the actor exits through the matching colour.

Overridable Blueprint events

NameDetailed description
Directional TriggerGeneral event called for every recognised crossing.
Trigger Red In, Trigger Blue In, Trigger Green In, Trigger Yellow InCalled for entry from the matching direction.
Trigger Red Out, Trigger Blue Out, Trigger Green Out, Trigger Yellow OutCalled for exit through the matching direction.

ADS Directional Trigger Action

Creating an action

Create a Blueprint child of ADS Directional Trigger Action, then implement its Execute Action event. Create editable variables in the Value category when you need per-trigger settings.

Settings

NameDetailed description
Display NameOptional label displayed in the trigger Details panel. The Blueprint class name is used when empty.

Functions

NameDetailed description
Execute ActionEvent implemented by the child Blueprint and called by the trigger.
Get Action Display NameReturns the action's display label.
Get World Context ObjectReturns the world-context object for Blueprint nodes that require one.

Configuring trigger cases

Adding a case

  1. Select a BP_DirectionalTrigger in the level.
  2. Under ADS Directional Trigger, click Add Case.
  3. Select Red - In, Red - Out, Blue - In, Blue - Out, Green - In, Green - Out, Yellow - In or Yellow - Out.
  4. Click Add Action and select your ADS Directional Trigger Action Blueprint child.
  5. Set the action's Value variables when available.

Event data

Every dispatcher and Blueprint event provides ADS Directional Trigger Event Data.

NameDetailed description
Triggering ActorActor that crossed the area.
Triggering ComponentOverlapping component.
PhaseWhether the actor enters (In) or exits (Out) the central area.
DirectionDetected direction: red, blue, green, yellow, up, down or unknown.
Has Trigger EventWhether direction and phase produced a configurable horizontal event.
Trigger EventAssociated horizontal event, such as Green - In.
World Movement DirectionNormalised movement direction in world space.
Local Movement DirectionNormalised movement direction in trigger-local space.
Entry World LocationActor location on central-area entry.
Current World LocationActor location for the current event.
Direction ScoreMatch score between movement and selected direction.