FGameplayEffectModifierMagnitude::AttemptCalculateMagnitude

Attempts to calculate the magnitude given the provided spec.

Windows
MacOS
Linux

References

Module

GameplayAbilities

Header

/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/GameplayEffect.h

Include

#include "GameplayEffect.h"

Source

/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Private/GameplayEffect.cpp

Syntax

bool AttemptCalculateMagnitude
(
    const FGameplayEffectSpec & InRelevantSpec,
    OUT float & OutCalculatedMagnitude,
    bool WarnIfSetByCallerFail,
    float DefaultSetbyCaller
) const

Remarks

Attempts to calculate the magnitude given the provided spec. May fail if necessary information (such as captured attributes) is missing from the spec.

Returns

True if the calculation was successful, false if it was not

Parameters

Parameter

Description

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

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss