INSODIMENSIONStudios
FeedbackFXReference

Triggers Reference

Automatic FeedbackFX triggers - Attribute thresholds for GAS integration

Triggers Reference

Triggers automatically raise events when conditions are met.


Base Trigger Properties

All triggers inherit these properties:

PropertyTypeDefaultDescription
EventTagToRaiseFGameplayTag-Event tag to raise when condition met
Magnitudefloat1.0Magnitude passed to events (any value)
bAutoRemoveWhenConditionFalsebooltrueAuto-remove persistent effects when cleared

Attribute Trigger

Class: UAgenticFeedbackFXTrigger_Attribute

Monitors a GAS (Gameplay Ability System) attribute and triggers when it crosses a threshold.

PropertyTypeDefaultDescription
AttributeFGameplayAttribute-Attribute to monitor (e.g., Health)
MaxAttributeFGameplayAttribute-For percentage mode (e.g., MaxHealth)
ComparisonEAgenticAttributeComparisonLessThanHow to compare
Thresholdfloat25.0Value to compare against
bUsePercentagebooltrueCompare percentage vs absolute
Hysteresisfloat5.0Buffer to prevent flickering
bMagnitudeFromAttributeboolfalseCalculate magnitude from value
bAutoRemoveWhenConditionFalsebooltrueAuto-remove persistent effects

Comparison Operators

ComparisonTriggers When
LessThanValue is less than Threshold
LessThanOrEqualValue is less than or equal to Threshold
GreaterThanValue is greater than Threshold
GreaterThanOrEqualValue is greater than or equal to Threshold

Hysteresis

Prevents rapid on/off flickering when value hovers near threshold.

Example with Threshold=25, Hysteresis=5:

  • Triggers when value drops below 25
  • Only clears when value rises above 30 (25 + 5)
HealthTrigger StateEffect
30% → 24%ActivatesVignette appears
24% → 26%Still activeNo change
26% → 31%DeactivatesVignette fades out
31% → 29%Still inactiveNo change
29% → 24%ActivatesVignette appears

Magnitude from Attribute

When bMagnitudeFromAttribute = true:

  • For LessThan: Lower value = higher magnitude
    • At 20% health: magnitude = 1 - (20/25) = 0.2
    • At 5% health: magnitude = 1 - (5/25) = 0.8
  • For GreaterThan: Higher value = higher magnitude

This makes effects intensify as the condition worsens.


Example Configurations

Low Health Warning

Attribute: Health
MaxAttribute: MaxHealth
Comparison: LessThan
Threshold: 25 (percent)
Hysteresis: 5
bUsePercentage: true
bMagnitudeFromAttribute: true
bAutoRemoveWhenConditionFalse: true
EventTagToRaise: Event.Status.LowHealth

Linked to a persistent red vignette post-process effect.

Critical Health

Attribute: Health
MaxAttribute: MaxHealth
Comparison: LessThan
Threshold: 10 (percent)
Hysteresis: 3
bMagnitudeFromAttribute: true
EventTagToRaise: Event.Status.CriticalHealth

Linked to intense pulsing vignette + heartbeat sound.

Rage/Power Surge

Attribute: Rage
MaxAttribute: MaxRage
Comparison: GreaterThanOrEqual
Threshold: 90 (percent)
Hysteresis: 10
EventTagToRaise: Event.Status.RageFull

Linked to screen edge glow effect.

Stamina Exhausted

Attribute: Stamina
MaxAttribute: MaxStamina
Comparison: LessThan
Threshold: 5 (percent)
EventTagToRaise: Event.Status.Exhausted

Linked to desaturated/blur effect.


Creating Custom Triggers

Blueprint

  1. Create Blueprint inheriting from AgenticFeedbackFXTrigger
  2. Implement On Initialize event:
    • Receives OwningPawn and Component as parameters
    • Cast pawn to your character, bind to Event Dispatchers
  3. Implement On Shutdown event:
    • Unbind any delegates (pawn may be null if destroyed)
  4. Call On Condition Met when your condition is true (pass magnitude)
  5. Call On Condition No Longer Met when condition clears
  6. (Optional) Implement Populate Context event and use Set Context Value to add custom values
On Initialize (OwningPawn, Component):
  Cast OwningPawn to MyCharacter
  Bind to MyCharacter.OnDamageTaken → HandleDamage

HandleDamage (Damage):
  On Condition Met (Damage)

On Shutdown (OwningPawn):
  If OwningPawn valid → Unbind from OnDamageTaken

Populate Context:
  Set Context Value ("HitAngle", 45.0)
  Set Context Value ("IsCritical", 1.0)

C++

UCLASS(BlueprintType, meta = (DisplayName = "My Custom Trigger"))
class UAgenticFeedbackFXTrigger_MyTrigger : public UAgenticFeedbackFXTrigger
{
    GENERATED_BODY()

public:
    virtual void Initialize(UAgenticFeedbackFXComponent* InComponent) override
    {
        Super::Initialize(InComponent);
        // Bind to your game events here
        if (APawn* Pawn = GetOwningPawn())
        {
            // Bind to delegates on the pawn
        }
    }

    virtual void Shutdown(UAgenticFeedbackFXComponent* InComponent) override
    {
        // Unbind events first
        if (APawn* Pawn = GetOwningPawn())
        {
            // Unbind delegates
        }
        Super::Shutdown(InComponent);
    }

    // Override to add custom context values
    virtual void PopulateContext_Implementation() override
    {
        // Add named values for material parameter mapping
        SetContextValue("MyCustomValue", 42.0f);
    }

protected:
    void HandleEvent(float Value)
    {
        OnConditionMet(Value);  // Raises EventTagToRaise with magnitude
    }
};

Tips

  • Hysteresis is critical for health-based effects - players often hover near thresholds
  • Auto-remove is usually what you want for persistent effects tied to triggers
  • Magnitude from attribute makes effects feel responsive to severity
  • Combine with persistent post-process (Duration=0) for status overlays