UAttributeSet::PostGameplayEffectExecute
#include "AttributeSet.h"
Access: public
Specifiers: virtual
Description
Called immediately after a GameplayEffect execution has modified an attribute's base value. Use this to trigger follow-on gameplay logic such as clamping Health after Damage is applied.
Caveats & Gotchas
- • The modification has already happened by this point; you can't reject it here, only react to it (e.g. clamp CurrentValue or broadcast a delegate).
- • Like PreGameplayEffectExecute, only fires for 'execute' style modifications, not duration-based buffs applied via aggregators.
Signature
virtual void PostGameplayEffectExecute(const struct FGameplayEffectModCallbackData &Data) { } Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Data | const FGameplayEffectModCallbackData& | Callback context describing the effect execution that just modified an attribute. | — |
Return Type
void Example
Apply Damage to Health and clamp C++
void UMyHealthSet::PostGameplayEffectExecute(const FGameplayEffectModCallbackData& Data)
{
if (Data.EvaluatedData.Attribute == GetDamageAttribute())
{
SetHealth(FMath::Clamp(GetHealth() - GetDamage(), 0.f, GetMaxHealth()));
SetDamage(0.f);
}
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?