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
| Name | Detailed description |
|---|
BoxTrigger | Central area that triggers events when the tracked actor enters or exits. |
BoxInitIn | Inner tracking area that records movement before the central area is crossed. |
BoxInitOut | Larger outer tracking area that starts tracking the actor before it enters. |
ArrowRedIn, ArrowBlueIn, ArrowGreenIn, ArrowYellowIn | Editor markers for recognised entry directions. |
ArrowRedOut, ArrowBlueOut, ArrowGreenOut, ArrowYellowOut | Editor markers for recognised exit directions. |
Instance settings
| Name | Detailed description |
|---|
Trigger Cases | Cases to handle. Add one case per required direction/phase combination, then add one or more actions. An event can only be present once. |
Functions
| Name | Detailed description |
|---|
Set Trigger Box Extent | Sets the central area half-size and refreshes tracking areas and markers. |
Get Trigger Box Extent | Returns the current central area half-size. |
Refresh Directional Trigger Preview | Refreshes areas and arrows in the editor. |
Get Direction From World Vector | Converts a movement vector to trigger-local direction and returns its match score. |
Should Accept Actor | Reports whether an actor matches the trigger filter. |
Get Trigger Event From Direction And Phase | Converts a horizontal direction and In/Out phase into an event. |
Dispatchers
| Name | Detailed description |
|---|
On Directional Triggered | Fires for every recognised crossing and provides complete event data. |
On Red In, On Blue In, On Green In, On Yellow In | Fire when the actor enters through the matching colour. |
On Red Out, On Blue Out, On Green Out, On Yellow Out | Fire when the actor exits through the matching colour. |
Overridable Blueprint events
| Name | Detailed description |
|---|
Directional Trigger | General event called for every recognised crossing. |
Trigger Red In, Trigger Blue In, Trigger Green In, Trigger Yellow In | Called for entry from the matching direction. |
Trigger Red Out, Trigger Blue Out, Trigger Green Out, Trigger Yellow Out | Called 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
| Name | Detailed description |
|---|
Display Name | Optional label displayed in the trigger Details panel. The Blueprint class name is used when empty. |
Functions
| Name | Detailed description |
|---|
Execute Action | Event implemented by the child Blueprint and called by the trigger. |
Get Action Display Name | Returns the action's display label. |
Get World Context Object | Returns the world-context object for Blueprint nodes that require one. |
Configuring trigger cases
Adding a case
- Select a
BP_DirectionalTrigger in the level.
- Under ADS Directional Trigger, click Add Case.
- Select
Red - In, Red - Out, Blue - In, Blue - Out, Green - In, Green - Out, Yellow - In or Yellow - Out.
- Click Add Action and select your
ADS Directional Trigger Action Blueprint child.
- Set the action's
Value variables when available.
Event data
Every dispatcher and Blueprint event provides ADS Directional Trigger Event Data.
| Name | Detailed description |
|---|
Triggering Actor | Actor that crossed the area. |
Triggering Component | Overlapping component. |
Phase | Whether the actor enters (In) or exits (Out) the central area. |
Direction | Detected direction: red, blue, green, yellow, up, down or unknown. |
Has Trigger Event | Whether direction and phase produced a configurable horizontal event. |
Trigger Event | Associated horizontal event, such as Green - In. |
World Movement Direction | Normalised movement direction in world space. |
Local Movement Direction | Normalised movement direction in trigger-local space. |
Entry World Location | Actor location on central-area entry. |
Current World Location | Actor location for the current event. |
Direction Score | Match score between movement and selected direction. |