Navigation
API > API/Plugins > API/Plugins/GameplayAbilities > API/Plugins/GameplayAbilities/FGameplayEffectModifierMagnitude
Description
Attempts to calculate the magnitude given the provided spec. May fail if necessary information (such as captured attributes) is missing from the spec.
| Name | AttemptCalculateMagnitude |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/GameplayEffect.h |
| Include Path | #include "GameplayEffect.h" |
| Source | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Private/GameplayEffect.cpp |
bool AttemptCalculateMagnitude
(
const FGameplayEffectSpec & InRelevantSpec,
float & OutCalculatedMagnitude,
bool WarnIfSetByCallerFail,
float DefaultSetbyCaller
) const
True if the calculation was successful, false if it was not
Parameters
| Name | Remarks |
|---|---|
| InRelevantSpec | Gameplay effect spec to use to calculate the magnitude with |
| OutCalculatedMagnitude | [OUT] Calculated value of the magnitude, will be set to 0.f in the event of failure |