UAbilitySystemBlueprintLibrary

Blueprint library for ability system.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

GameplayAbilities

Header

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

Include

#include "AbilitySystemBlueprintLibrary.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(Meta=(ScriptName="AbilitySystemLibrary"))
class UAbilitySystemBlueprintLibrary : public UBlueprintFunctionLibrary

Remarks

Blueprint library for ability system. Many of these functions are useful to call from native as well

Constructors

Name Description

Public function

UAbilitySystemBlueprintLibrary

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Static UFunction BlueprintPure, Category

FGameplayAbi...

 

AbilityTargetDataFromActor

(
    AActor* Actor
)

Creates single actor target data

Public function Static UFunction BlueprintPure, Category

FGameplayAbi...

 

AbilityTargetDataFromActorArray

(
    const TArray< AActor* >& Acto...,
    bool OneTargetPerHandle
)

Creates actor array target data

Public function Static UFunction BlueprintPure, Category

FGameplayAbi...

 

AbilityTargetDataFromHitResult

(
    const FHitResult& HitResult
)

Creates a target data with a single hit result

Public function Static UFunction BlueprintPure, Category

FGameplayAbi...

 

AbilityTargetDataFromLocations

(
    const FGameplayAbilityTargetingLoca...,
    const FGameplayAbilityTargetingLoca...
)

Creates a target data with a source and destination location

Public function Static UFunction BlueprintCallable, Category

FGameplayEff...

 

AddAssetTag

(
    FGameplayEffectSpecHandle SpecHandl...,
    FGameplayTag NewGameplayTag
)

Adds NewGameplayTag to this instance of the effect

Public function Static UFunction BlueprintCallable, Category

FGameplayEff...

 

AddAssetTags

(
    FGameplayEffectSpecHandle SpecHandl...,
    FGameplayTagContainer NewGameplayTa...
)

Adds NewGameplayTags to this instance of the effect

Public function Static UFunction BlueprintCallable, Category

FGameplayEff...

 

AddGrantedTag

(
    FGameplayEffectSpecHandle SpecHandl...,
    FGameplayTag NewGameplayTag
)

This instance of the effect will now grant NewGameplayTag to the object that this effect is applied to

Public function Static UFunction BlueprintCallable, Category

FGameplayEff...

 

AddGrantedTags

(
    FGameplayEffectSpecHandle SpecHandl...,
    FGameplayTagContainer NewGameplayTa...
)

This instance of the effect will now grant NewGameplayTags to the object that this effect is applied to

Public function Static UFunction BlueprintCallable, Category

FGameplayEff...

 

AddLinkedGameplayEffect

(
    FGameplayEffectSpecHandle SpecHandl...,
    TSubclassOf< UGameplayEffect > Link...
)

Adds LinkedGameplayEffect to SpecHandles.

Public function Static UFunction BlueprintCallable, Category

FGameplayEff...

 

AddLinkedGameplayEffectSpec

(
    FGameplayEffectSpecHandle SpecHandl...,
    FGameplayEffectSpecHandle LinkedGam...
)

Adds LinkedGameplayEffectSpec to SpecHandles.

Public function Static UFunction BlueprintCallable, Category

FGameplayAbi...

 

AppendTargetDataHandle

TargetData

Copies targets from HandleToAdd to TargetHandle

Public function Static UFunction BlueprintCallable, Category

FGameplayEff...

 

AssignSetByCallerMagnitude

(
    FGameplayEffectSpecHandle SpecHandl...,
    FName DataName,
    float Magnitude
)

GameplayEffectSpec

Public function Static UFunction BlueprintCallable, Category

FGameplayEff...

 

AssignTagSetByCallerMagnitude

(
    FGameplayEffectSpecHandle SpecHandl...,
    FGameplayTag DataTag,
    float Magnitude
)

Sets a gameplay tag Set By Caller magnitude value

Public function Static UFunction BlueprintPure, Category, Meta

void

 

BreakGameplayCueParameters

(
    const FGameplayCueParameters& Para...,
    float& NormalizedMagnitude,
    float& RawMagnitude,
    FGameplayEffectContextHandle& Effe...,
    FGameplayTag& MatchedTagName,
    FGameplayTag& OriginalTag,
    FGameplayTagContainer& AggregatedS...,
    FGameplayTagContainer& AggregatedT...,
    FVector& Location,
    FVector& Normal,
    AActor*& Instigator,
    AActor*& EffectCauser,
    UObject*& SourceObject,
    UPhysicalMaterial*& PhysicalMa...,
    int32& GameplayEffectLevel,
    int32& AbilityLevel,
    USceneComponent*& TargetAttach...,
    bool& bReplicateLocationWhenUsingM...
)

Native break, to avoid having to deal with quantized vector types

Public function Static UFunction BlueprintPure, Category

FGameplayEff...

 

CloneSpecHandle

(
    AActor* InNewInstigator,
    AActor* InEffectCauser,
    FGameplayEffectSpecHandle GameplayE...
)

Create a spec handle, cloning another

Public function Static UFunction BlueprintPure, Category

bool

 

DoesGameplayCueMeetTagRequirements

(
    FGameplayCueParameters Parameters,
    const FGameplayTagRequirements& So...,
    const FGameplayTagRequirements& Ta...
)

Returns true if the aggregated source and target tags from the effect spec meets the tag requirements

Public function Static UFunction BlueprintPure, Category

bool

 

DoesTargetDataContainActor

(
    const FGameplayAbilityTargetDataHan...,
    int32 Index,
    AActor* Actor
)

Returns true if the given TargetData has the actor passed in targeted

Public function Static UFunction BlueprintCallable, Category, Meta

void

 

EffectContextAddHitResult

(
    FGameplayEffectContextHandle Effect...,
    FHitResult HitResult,
    bool bReset
)

Adds a hit result to the effect context

Public function Static UFunction BlueprintPure, Category, Meta

AActor *

 

EffectContextGetEffectCauser

(
    FGameplayEffectContextHandle Effect...
)

Gets the physical actor that caused the effect, possibly a projectile or weapon

Public function Static UFunction BlueprintPure, Category, Meta

FHitResult

 

EffectContextGetHitResult

(
    FGameplayEffectContextHandle Effect...
)

Extracts a hit result from the effect context if it is set

Public function Static UFunction BlueprintPure, Category, Meta

AActor *

 

EffectContextGetInstigatorActor

(
    FGameplayEffectContextHandle Effect...
)

Gets the instigating actor (that holds the ability system component) of the EffectContext

Public function Static UFunction BlueprintPure, Category, Meta

FVector

 

EffectContextGetOrigin

(
    FGameplayEffectContextHandle Effect...
)

Gets the location the effect originated from

Public function Static UFunction BlueprintPure, Category, Meta

AActor *

 

EffectContextGetOriginalInstigatorActor

(
    FGameplayEffectContextHandle Effect...
)

Gets the original instigator actor that started the chain of events to cause this effect

Public function Static UFunction BlueprintPure, Category, Meta

UObject *...

 

EffectContextGetSourceObject

(
    FGameplayEffectContextHandle Effect...
)

Gets the source object of the effect.

Public function Static UFunction BlueprintPure, Category, Meta

bool

 

EffectContextHasHitResult

(
    FGameplayEffectContextHandle Effect...
)

Returns true if there is a valid hit result inside the effect context

Public function Static UFunction BlueprintPure, Category, Meta

bool

 

EffectContextIsInstigatorLocallyControlled

(
    FGameplayEffectContextHandle Effect...
)

Returns true if the ability system component that instigated this is locally controlled

Public function Static UFunction BlueprintPure, Category, Meta

bool

 

EffectContextIsValid

(
    FGameplayEffectContextHandle Effect...
)

GameplayEffectContext

Returns true if this context has ever been initialized

Public function Static UFunction BlueprintCallable, Category, Meta

void

 

EffectContextSetOrigin

(
    FGameplayEffectContextHandle Effect...,
    FVector Origin
)

Sets the location the effect originated from

Public function Static UFunction BlueprintPure, Category, Meta

bool

 

EqualEqual_GameplayAttributeGameplayAttribute

(
    FGameplayAttribute AttributeA,
    FGameplayAttribute AttributeB
)

Simple equality operator for gameplay attributes

Public function Static UFunction BlueprintPure, Category

float

 

EvaluateAttributeValueWithTags

(
    UAbilitySystemComponent* Abili...,
    FGameplayAttribute Attribute,
    const FGameplayTagContainer& Sourc...,
    const FGameplayTagContainer& Targe...,
    bool& bSuccess
)

Returns the value of Attribute from the ability system component AbilitySystem after evaluating it with source and target tags.

Public function Static UFunction BlueprintPure, Category

float

 

EvaluateAttributeValueWithTagsAndBase

(
    UAbilitySystemComponent* Abili...,
    FGameplayAttribute Attribute,
    const FGameplayTagContainer& Sourc...,
    const FGameplayTagContainer& Targe...,
    float BaseValue,
    bool& bSuccess
)

Returns the value of Attribute from the ability system component AbilitySystem after evaluating it with source and target tags using the passed in base value instead of the real base value.

Public function Static UFunction BlueprintPure, Category

FGameplayAbi...

 

FilterTargetData

Create a new target data handle with filtration performed on the data

Public function Static UFunction BlueprintCallable, Category

void

 

ForwardGameplayCueToTarget

(
    TScriptInterface< IGameplayCueInter...,
    EGameplayCueEvent::Type EventType,
    FGameplayCueParameters Parameters
)

Forwards the gameplay cue to another gameplay cue interface object

Public function Static UFunction BlueprintPure, Category

UAbilitySyst...

 

GetAbilitySystemComponent

(
    AActor* Actor
)

Tries to find an ability system component on the actor, will use AbilitySystemInterface

Public function Static UFunction BlueprintPure, Category, Meta

FString

 

GetActiveGameplayEffectDebugString

(
    FActiveGameplayEffectHandle ActiveH...
)

Returns a debug string for display

Public function Static UFunction BlueprintCallable, Category

float

 

GetActiveGameplayEffectExpectedEndTime

(
    FActiveGameplayEffectHandle ActiveH...
)

Returns the expected end time (when we think the GE will expire) for a given GameplayEffect (

someone could remove or change it before that happens!)

Public function Static UFunction BlueprintCallable, Category, Meta

float

 

GetActiveGameplayEffectRemainingDuration

(
    UObject* WorldContextObject,
    FActiveGameplayEffectHandle ActiveH...
)

Returns the total duration for a given GameplayEffect, basically ExpectedEndTime - Current Time

Public function Static UFunction BlueprintCallable, Category

int32

 

GetActiveGameplayEffectStackCount

(
    FActiveGameplayEffectHandle ActiveH...
)

FActiveGameplayEffectHandle

Public function Static UFunction BlueprintCallable, Category

int32

 

GetActiveGameplayEffectStackLimitCount

(
    FActiveGameplayEffectHandle ActiveH...
)

Returns stack limit count of an active Gameplay Effect.

Public function Static UFunction BlueprintCallable, Category

float

 

GetActiveGameplayEffectStartTime

(
    FActiveGameplayEffectHandle ActiveH...
)

Returns the start time (time which the GE was added) for a given GameplayEffect

Public function Static UFunction BlueprintCallable, Category

float

 

GetActiveGameplayEffectTotalDuration

(
    FActiveGameplayEffectHandle ActiveH...
)

Returns the total duration for a given GameplayEffect

Public function Static UFunction BlueprintPure, Category

AActor *

 

GetActorByIndex

(
    FGameplayCueParameters Parameters,
    int32 Index
)

Returns actor stored in the Effect Context used by this cue

Public function Static UFunction BlueprintPure, Category

int32

 

GetActorCount

(
    FGameplayCueParameters Parameters
)

Returns number of actors stored in the Effect Context used by this cue

Public function Static UFunction BlueprintPure, Category

TArray< AAct...

 

GetActorsFromTargetData

(
    const FGameplayAbilityTargetDataHan...,
    int32 Index
)

Returns all actors targeted, for a given index

Public function Static UFunction BlueprintPure, Category

TArray< AAct...

 

GetAllActorsFromTargetData

(
    const FGameplayAbilityTargetDataHan...
)

Returns all actors targeted

Public function Static UFunction BlueprintPure, Category

TArray< FGam...

 

GetAllLinkedGameplayEffectSpecHandles

(
    FGameplayEffectSpecHandle SpecHandl...
)

Returns handles for all Linked GE Specs that SpecHandle may apply.

Public function Static UFunction BlueprintPure, Category

int32

 

GetDataCountFromTargetData

(
    const FGameplayAbilityTargetDataHan...
)

Returns number of target data objects, not necessarily number of distinct targets

Public function Static UFunction BlueprintCallable, Category

FGameplayEff...

 

GetEffectContext

(
    FGameplayEffectSpecHandle SpecHandl...
)

Gets the GameplayEffectSpec's effect context handle

Public function Static UFunction BlueprintPure, Category

float

 

GetFloatAttribute

(
    const AActor* Actor,
    FGameplayAttribute Attribute,
    bool& bSuccessfullyFoundAttribute
)

Returns the value of Attribute from the ability system component belonging to Actor.

Public function Static UFunction BlueprintPure, Category

float

 

GetFloatAttributeBase

(
    const AActor* Actor,
    FGameplayAttribute Attribute,
    bool& bSuccessfullyFoundAttribute
)

Returns the base value of Attribute from the ability system component belonging to Actor.

Public function Static UFunction BlueprintPure, Category

float

 

GetFloatAttributeBaseFromAbilitySystemComponent

(
    const UAbilitySystemComponent*...,
    FGameplayAttribute Attribute,
    bool& bSuccessfullyFoundAttribute
)

Returns the base value of Attribute from the ability system component AbilitySystemComponent.

Public function Static UFunction BlueprintPure, Category

float

 

GetFloatAttributeFromAbilitySystemComponent

(
    const UAbilitySystemComponent*...,
    FGameplayAttribute Attribute,
    bool& bSuccessfullyFoundAttribute
)

Returns the value of Attribute from the ability system component AbilitySystem.

Public function Static UFunction BlueprintPure, Category

bool

 

GetGameplayCueDirection

(
    AActor* TargetActor,
    FGameplayCueParameters Parameters,
    FVector& Direction
)

Gets the best normalized effect direction for this gameplay cue.

Public function Static UFunction BlueprintPure, Category

bool

 

GetGameplayCueEndLocationAndNormal

(
    AActor* TargetActor,
    FGameplayCueParameters Parameters,
    FVector& Location,
    FVector& Normal
)

Gets the best end location and normal for this gameplay cue.

Public function Static UFunction BlueprintPure, Category

FHitResult

 

GetHitResult

(
    FGameplayCueParameters Parameters
)

Returns a hit result stored in the effect context if valid

Public function Static UFunction BlueprintPure, Category

FHitResult

 

GetHitResultFromTargetData

(
    const FGameplayAbilityTargetDataHan...,
    int32 Index
)

Returns the hit result for a given index if it exists

Public function Static UFunction BlueprintPure, Category

AActor *

 

GetInstigatorActor

(
    FGameplayCueParameters Parameters
)

Gets the instigating actor (that holds the ability system component) of the GameplayCue

Public function Static UFunction BlueprintPure, Category

FTransform

 

GetInstigatorTransform

(
    FGameplayCueParameters Parameters
)

Gets instigating world location

Public function Static UFunction BlueprintCallable, Category

float

 

GetModifiedAttributeMagnitude

(
    FGameplayEffectSpecHandle SpecHandl...,
    FGameplayAttribute Attribute
)

GameplayEffectSpec

Public function Static

float

 

GetModifiedAttributeMagnitude

(
    const FGameplayEffectSpec& SpecHan...,
    FGameplayAttribute Attribute
)

Helper function that may be useful to call from native as well

Public function Static UFunction BlueprintPure, Category

FVector

 

GetOrigin

(
    FGameplayCueParameters Parameters
)

Gets instigating world location

Public function Static UFunction BlueprintPure, Category

FVector

 

GetTargetDataEndPoint

(
    const FGameplayAbilityTargetDataHan...,
    int32 Index
)

Returns the end point for a given index if it exists

Public function Static UFunction BlueprintPure, Category

FTransform

 

GetTargetDataEndPointTransform

(
    const FGameplayAbilityTargetDataHan...,
    int32 Index
)

Returns the end point transform for a given index if it exists

Public function Static UFunction BlueprintPure, Category

FTransform

 

GetTargetDataOrigin

(
    const FGameplayAbilityTargetDataHan...,
    int32 Index
)

Returns the origin for a given index if it exists

Public function Static UFunction BlueprintPure, Category

bool

 

HasHitResult

(
    FGameplayCueParameters Parameters
)

Checks if the effect context has a hit reslt stored inside

Public function Static UFunction BlueprintPure, Category

bool

 

IsInstigatorLocallyControlled

(
    FGameplayCueParameters Parameters
)

GameplayCue

Public function Static UFunction BlueprintPure, Category

bool

 

IsInstigatorLocallyControlledPlayer

(
    FGameplayCueParameters Parameters
)

Returns true if the ability system component that spawned this cue is locally controlled and a player

Public function Static UFunction BlueprintPure, Category

bool

 

IsValid

(
    FGameplayAttribute Attribute
)

Attribute

Returns true if the attribute actually exists

Public function Static UFunction BlueprintPure, Category

FGameplayTar...

 

MakeFilterHandle

(
    FGameplayTargetDataFilter Filter,
    AActor* FilterActor
)

Create a handle for filtering target data, filling out all fields

Public function Static UFunction BlueprintPure, Category, Meta

FGameplayCue...

 

MakeGameplayCueParameters

(
    float NormalizedMagnitude,
    float RawMagnitude,
    FGameplayEffectContextHandle Effect...,
    FGameplayTag MatchedTagName,
    FGameplayTag OriginalTag,
    FGameplayTagContainer AggregatedSou...,
    FGameplayTagContainer AggregatedTar...,
    FVector Location,
    FVector Normal,
    AActor* Instigator,
    AActor* EffectCauser,
    UObject* SourceObject,
    UPhysicalMaterial* PhysicalMat...,
    int32 GameplayEffectLevel,
    int32 AbilityLevel,
    USceneComponent* TargetAttachC...,
    bool bReplicateLocationWhenUsingMin...
)

Native make, to avoid having to deal with quantized vector types

Public function Static UFunction BlueprintPure, Category

FGameplayEff...

 

MakeSpecHandle

(
    UGameplayEffect* InGameplayEff...,
    AActor* InInstigator,
    AActor* InEffectCauser,
    float InLevel
)

Create a spec handle, filling out all fields

Public function Static UFunction BlueprintPure, Category, Meta

bool

 

NotEqual_GameplayAttributeGameplayAttribute

(
    FGameplayAttribute AttributeA,
    FGameplayAttribute AttributeB
)

Simple inequality operator for gameplay attributes

Public function Static UFunction BlueprintCallable, Category, Meta

void

 

SendGameplayEventToActor

(
    AActor* Actor,
    FGameplayTag EventTag,
    FGameplayEventData Payload
)

This function can be used to trigger an ability on the actor in question with useful payload data.

Public function Static UFunction BlueprintCallable, Category

FGameplayEff...

 

SetDuration

(
    FGameplayEffectSpecHandle SpecHandl...,
    float Duration
)

Manually sets the duration on a specific effect

Public function Static UFunction BlueprintCallable, Category

FGameplayEff...

 

SetStackCount

(
    FGameplayEffectSpecHandle SpecHandl...,
    int32 StackCount
)

Sets the GameplayEffectSpec's StackCount to the specified amount (prior to applying)

Public function Static UFunction BlueprintCallable, Category

FGameplayEff...

 

SetStackCountToMax

(
    FGameplayEffectSpecHandle SpecHandl...
)

Sets the GameplayEffectSpec's StackCount to the max stack count defined in the GameplayEffect definition

Public function Static UFunction BlueprintPure, Category

bool

 

TargetDataHasActor

(
    const FGameplayAbilityTargetDataHan...,
    int32 Index
)

Returns true if the given TargetData has at least 1 actor targeted

Public function Static UFunction BlueprintPure, Category

bool

 

TargetDataHasEndPoint

(
    const FGameplayAbilityTargetDataHan...,
    int32 Index
)

Returns true if the target data has an end point

Public function Static UFunction BlueprintPure, Category

bool

 

TargetDataHasHitResult

(
    const FGameplayAbilityTargetDataHan...,
    int32 Index
)

Returns true if the target data has a hit result

Public function Static UFunction BlueprintPure, Category

bool

 

TargetDataHasOrigin

(
    const FGameplayAbilityTargetDataHan...,
    int32 Index
)

Returns true if the target data has an origin

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