UGameplayModMagnitudeCalculation

Class used to perform custom gameplay effect modifier calculations, either via blueprint or native code

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

GameplayAbilities

Header

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

Include

#include "GameplayModMagnitudeCalculation.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(BlueprintType, Blueprintable, Abstract)
class UGameplayModMagnitudeCalculation : public UGameplayEffectCalculation

Remarks

Class used to perform custom gameplay effect modifier calculations, either via blueprint or native code

Variables

Name Description

Protected variable UProperty Category, EditDefaultsOnly, AdvancedDisplay

bool

 

bAllowNonNetAuthorityDependencyRegistration

Whether the calculation allows non-net authorities to register the external dependency multi-cast delegate or not; Effectively whether clients are allowed to perform the custom calculation themselves or not

Constructors

Name Description

Public function

UGameplayModMagnitudeCalculation

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const UFunction Category blueprintnativeevent

float

 

CalculateBaseMagnitude

(
    const FGameplayEffectSpec& Spec
)

Calculate the base magnitude of the gameplay effect modifier, given the specified spec.

Protected function Const

bool

 

GetCapturedAttributeMagnitude

(
    const FGameplayEffectAttributeCaptu...,
    const FGameplayEffectSpec& Spec,
    const FAggregatorEvaluateParameters...,
    OUT float& Magnitude
)

Convenience method to get attribute magnitude during a CalculateMagnitude call

Public function Virtual Const

FOnExternalG...

 

GetExternalModifierDependencyMulticast

(
    const FGameplayEffectSpec& Spec,
    UWorld* World
)

If the magnitude resultant from the custom calculation depends on game code-specific conditions that are not under the purview of the ability system, this method should be overridden to provide a multicast delegate that will fire when the reliant conditions change, so that the magnitude can be recalculated and updated.

Public function Const

bool

 

ShouldAllowNonNetAuthorityDependencyRegistration()

Simple accessor to bAllowNonNetAuthorityDependencyRegistration with some validation: Read the comment on that variable for usage!!!

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