Native-defined blueprint function
PreAttributeChange#
Called just before any modification happens to an attribute. This is lower level than PreAttributeModify/PostAttribute modify.
There is no additional context provided here since anything can trigger this. Executed effects, duration based effects, effects being removed, immunity being applied, stacking rules changing, etc.
This function is meant to enforce things like "Health = Clamp(Health, 0, MaxHealth)" and NOT things like "trigger this extra thing if damage is applied, etc".
OutValue is a mutable reference so you are able to clamp the newly applied value as well (Note When overriding in BP, this is the return value of the BP function, make sure to pass in the new value. Typical implementation should simply return the input value parameter)
In parameters#
-
Gameplay Attribute Struct (by const ref) In Attribute
The Gameplay Attribute whose value is about to change
-
Float In Value = 0.0
Original value for the Gameplay Attribute
Out parameters#
-
FloatOut Value
Return value of the function which represents the new value for the Gameplay Attribute