UGBAAttributeSetBlueprintBase::​

K2_PreGameplayEffectExecute#

  • Declared in "Abilities/GBAAttributeSetBlueprintBase.h"
public:
UFUNCTION(
BlueprintNativeEvent, Category = "AttributeSet", DisplayName = "PreGameplayEffectExecute")
bool K2_PreGameplayEffectExecute(
const FGameplayAttribute& InAttribute,
const FGBAAttributeSetExecutionData& InData
)

Called just before modifying the value of an attribute. AttributeSet can make additional modifications here.

Return true to continue, or false to throw out the modification

Note this is only called during an 'execute'. E.g., a modification to the 'base value' of an attribute. It is not called during an application of a GameplayEffect, such as a 5 second +10 movement speed buff.

This should apply 'gamewide' rules. Such as clamping Health to MaxHealth or granting +3 health for every point of strength, etc PreGameplayEffectExecute can return false to 'throw out' this modification.

(Note When overriding this function in BP, make sure to return true, otherwise the Gameplay Effects won't apply anymore. As the default behavior for the editor is to implement the method with return value set to false, this is something to be wary off.)

Parameters#

  • const FGameplayAttribute& InAttribute

    The Gameplay Attribute whose value is about to be changed by a Gameplay Effect

  • const FGBAAttributeSetExecutionData& InData

    Payload with information extracted from FGameplayEffectModCallbackData, the Source / Target actor, Ability System Component, Controllers, Effect Context, Specs and Source Tags, Magnitude and Delta values, etc.

Return value#

bool

Return true to continue, or false to throw out the modification.