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:
| Property | Type | Default | Description |
|---|---|---|---|
EventTagToRaise | FGameplayTag | - | Event tag to raise when condition met |
Magnitude | float | 1.0 | Magnitude passed to events (any value) |
bAutoRemoveWhenConditionFalse | bool | true | Auto-remove persistent effects when cleared |
Attribute Trigger
Class: UAgenticFeedbackFXTrigger_Attribute
Monitors a GAS (Gameplay Ability System) attribute and triggers when it crosses a threshold.
| Property | Type | Default | Description |
|---|---|---|---|
Attribute | FGameplayAttribute | - | Attribute to monitor (e.g., Health) |
MaxAttribute | FGameplayAttribute | - | For percentage mode (e.g., MaxHealth) |
Comparison | EAgenticAttributeComparison | LessThan | How to compare |
Threshold | float | 25.0 | Value to compare against |
bUsePercentage | bool | true | Compare percentage vs absolute |
Hysteresis | float | 5.0 | Buffer to prevent flickering |
bMagnitudeFromAttribute | bool | false | Calculate magnitude from value |
bAutoRemoveWhenConditionFalse | bool | true | Auto-remove persistent effects |
Comparison Operators
| Comparison | Triggers When |
|---|---|
LessThan | Value is less than Threshold |
LessThanOrEqual | Value is less than or equal to Threshold |
GreaterThan | Value is greater than Threshold |
GreaterThanOrEqual | Value 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)
| Health | Trigger State | Effect |
|---|---|---|
| 30% → 24% | Activates | Vignette appears |
| 24% → 26% | Still active | No change |
| 26% → 31% | Deactivates | Vignette fades out |
| 31% → 29% | Still inactive | No change |
| 29% → 24% | Activates | Vignette 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
- At 20% health: magnitude =
- 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.LowHealthLinked 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.CriticalHealthLinked to intense pulsing vignette + heartbeat sound.
Rage/Power Surge
Attribute: Rage
MaxAttribute: MaxRage
Comparison: GreaterThanOrEqual
Threshold: 90 (percent)
Hysteresis: 10
EventTagToRaise: Event.Status.RageFullLinked to screen edge glow effect.
Stamina Exhausted
Attribute: Stamina
MaxAttribute: MaxStamina
Comparison: LessThan
Threshold: 5 (percent)
EventTagToRaise: Event.Status.ExhaustedLinked to desaturated/blur effect.
Creating Custom Triggers
Blueprint
- Create Blueprint inheriting from
AgenticFeedbackFXTrigger - Implement On Initialize event:
- Receives
OwningPawnandComponentas parameters - Cast pawn to your character, bind to Event Dispatchers
- Receives
- Implement On Shutdown event:
- Unbind any delegates (pawn may be null if destroyed)
- Call On Condition Met when your condition is true (pass magnitude)
- Call On Condition No Longer Met when condition clears
- (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