Navigation
API > API/Plugins > API/Plugins/GameplayAbilities
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UBlueprintFunctionLibrary
- UAbilitySystemBlueprintLibrary
References
| Module | GameplayAbilities |
| Header | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/AbilitySystemBlueprintLibrary.h |
| Include | #include "AbilitySystemBlueprintLibrary.h" |
Syntax
UCLASS&40;Meta&61;&40;ScriptName&61;"AbilitySystemLibrary"&41;&41;
class UAbilitySystemBlueprintLibrary : public UBlueprintFunctionLibrary
Remarks
Blueprint library for ability system. Many of these functions are useful to call from native as well
Constructors
| Type | Name | Description | |
|---|---|---|---|
UAbilitySystemBlueprintLibrary
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FGameplayAbilityTargetDataHandle | AbilityTargetDataFromActor
(
AActor* Actor |
Creates single actor target data | |
| FGameplayAbilityTargetDataHandle | AbilityTargetDataFromActorArray
(
const TArray< AActor* >& ActorArray, |
Creates actor array target data | |
| FGameplayAbilityTargetDataHandle | AbilityTargetDataFromHitResult
(
const FHitResult& HitResult |
Creates a target data with a single hit result | |
| FGameplayAbilityTargetDataHandle | AbilityTargetDataFromLocations
(
const FGameplayAbilityTargetingLocationInfo& SourceLocation, |
Creates a target data with a source and destination location | |
| FGameplayEffectSpecHandle | AddAssetTag
(
FGameplayEffectSpecHandle SpecHandle, |
Adds NewGameplayTag to this instance of the effect | |
| FGameplayEffectSpecHandle | AddAssetTags
(
FGameplayEffectSpecHandle SpecHandle, |
Adds NewGameplayTags to this instance of the effect | |
| FGameplayEffectSpecHandle | AddGrantedTag
(
FGameplayEffectSpecHandle SpecHandle, |
This instance of the effect will now grant NewGameplayTag to the object that this effect is applied to | |
| FGameplayEffectSpecHandle | AddGrantedTags
(
FGameplayEffectSpecHandle SpecHandle, |
This instance of the effect will now grant NewGameplayTags to the object that this effect is applied to | |
| bool | AddLooseGameplayTags
(
AActor* Actor, |
Manually adds a set of tags to a given actor, and optionally replicates them. | |
| FGameplayAbilityTargetDataHandle | AppendTargetDataHandle
(
FGameplayAbilityTargetDataHandle TargetHandle, |
TargetData Copies targets from HandleToAdd to TargetHandle | |
| FGameplayEffectSpecHandle | AssignSetByCallerMagnitude
(
FGameplayEffectSpecHandle SpecHandle, |
GameplayEffectSpec | |
| FGameplayEffectSpecHandle | AssignTagSetByCallerMagnitude
(
FGameplayEffectSpecHandle SpecHandle, |
Sets a gameplay tag Set By Caller magnitude value | |
| void | BreakGameplayCueParameters
(
const FGameplayCueParameters& Parameters, |
Native break, to avoid having to deal with quantized vector types | |
| FGameplayEffectSpecHandle | CloneSpecHandle
(
AActor* InNewInstigator, |
Create a spec handle, cloning another | |
| bool | DoesGameplayCueMeetTagRequirements
(
FGameplayCueParameters Parameters, |
Returns true if the aggregated source and target tags from the effect spec meets the tag requirements | |
| bool | DoesTargetDataContainActor
(
const FGameplayAbilityTargetDataHandle& TargetData, |
Returns true if the given TargetData has the actor passed in targeted | |
| void | EffectContextAddHitResult
(
FGameplayEffectContextHandle EffectContext, |
Adds a hit result to the effect context | |
| AActor * | EffectContextGetEffectCauser
(
FGameplayEffectContextHandle EffectContext |
Gets the physical actor that caused the effect, possibly a projectile or weapon | |
| FHitResult | EffectContextGetHitResult
(
FGameplayEffectContextHandle EffectContext |
Extracts a hit result from the effect context if it is set | |
| AActor * | EffectContextGetInstigatorActor
(
FGameplayEffectContextHandle EffectContext |
Gets the instigating actor (that holds the ability system component) of the EffectContext | |
| FVector | EffectContextGetOrigin
(
FGameplayEffectContextHandle EffectContext |
Gets the location the effect originated from | |
| AActor * | EffectContextGetOriginalInstigatorActor
(
FGameplayEffectContextHandle EffectContext |
Gets the original instigator actor that started the chain of events to cause this effect | |
| UObject * | EffectContextGetSourceObject
(
FGameplayEffectContextHandle EffectContext |
Gets the source object of the effect. | |
| bool | EffectContextHasHitResult
(
FGameplayEffectContextHandle EffectContext |
Returns true if there is a valid hit result inside the effect context | |
| bool | EffectContextIsInstigatorLocallyControlled
(
FGameplayEffectContextHandle EffectContext |
Returns true if the ability system component that instigated this is locally controlled | |
| bool | EffectContextIsValid
(
FGameplayEffectContextHandle EffectContext |
GameplayEffectContext Returns true if this context has ever been initialized | |
| void | EffectContextSetOrigin
(
FGameplayEffectContextHandle EffectContext, |
Sets the location the effect originated from | |
| bool | EqualEqual_ActiveGameplayEffectHandle
(
const FActiveGameplayEffectHandle& A, |
Equality operator for two Active Gameplay Effect Handles | |
| bool | EqualEqual_GameplayAbilitySpecHandle
(
const FGameplayAbilitySpecHandle& A, |
Equality operator for two Gameplay Ability Spec Handles | |
| bool | EqualEqual_GameplayAttributeGameplayAttribute
(
FGameplayAttribute AttributeA, |
Simple equality operator for gameplay attributes | |
| float | EvaluateAttributeValueWithTags
(
UAbilitySystemComponent* AbilitySystem, |
Returns the value of Attribute from the ability system component AbilitySystem after evaluating it with source and target tags. | |
| float | EvaluateAttributeValueWithTagsAndBase
(
UAbilitySystemComponent* AbilitySystem, |
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. | |
| FGameplayAbilityTargetDataHandle | FilterTargetData
(
const FGameplayAbilityTargetDataHandle& TargetDataHandle, |
Create a new target data handle with filtration performed on the data | |
| void | ForwardGameplayCueToTarget
(
TScriptInterface< IGameplayCueInterface > TargetCueInterface, |
Forwards the gameplay cue to another gameplay cue interface object | |
| UAbilitySystemComponent * | GetAbilitySystemComponent
(
AActor* Actor |
Tries to find an ability system component on the actor, will use AbilitySystemInterface or fall back to a component search | |
| FString | GetActiveGameplayEffectDebugString
(
FActiveGameplayEffectHandle ActiveHandle |
Returns a debug string for display | |
| float | GetActiveGameplayEffectExpectedEndTime
(
FActiveGameplayEffectHandle ActiveHandle |
Returns the expected end time (when we think the GE will expire) for a given GameplayEffect (note someone could remove or change it before that happens!) | |
| float | GetActiveGameplayEffectRemainingDuration
(
UObject* WorldContextObject, |
Returns the total duration for a given GameplayEffect, basically ExpectedEndTime - Current Time | |
| int32 | GetActiveGameplayEffectStackCount
(
FActiveGameplayEffectHandle ActiveHandle |
FActiveGameplayEffectHandle | |
| int32 | GetActiveGameplayEffectStackLimitCount
(
FActiveGameplayEffectHandle ActiveHandle |
Returns stack limit count of an active Gameplay Effect. | |
| float | GetActiveGameplayEffectStartTime
(
FActiveGameplayEffectHandle ActiveHandle |
Returns the start time (time which the GE was added) for a given GameplayEffect | |
| float | GetActiveGameplayEffectTotalDuration
(
FActiveGameplayEffectHandle ActiveHandle |
Returns the total duration for a given GameplayEffect | |
| AActor * | GetActorByIndex
(
FGameplayCueParameters Parameters, |
Returns actor stored in the Effect Context used by this cue | |
| int32 | GetActorCount
(
FGameplayCueParameters Parameters |
Returns number of actors stored in the Effect Context used by this cue | |
| TArray< AActor * > | GetActorsFromTargetData
(
const FGameplayAbilityTargetDataHandle& TargetData, |
Returns all actors targeted, for a given index | |
| TArray< AActor * > | GetAllActorsFromTargetData
(
const FGameplayAbilityTargetDataHandle& TargetData |
Returns all actors targeted | |
| int32 | GetDataCountFromTargetData
(
const FGameplayAbilityTargetDataHandle& TargetData |
Returns number of target data objects, not necessarily number of distinct targets | |
| FString | GetDebugStringFromGameplayAttribute
(
const FGameplayAttribute& Attribute |
Returns FString representation of a gameplay attribute's set class and name, in the form of AttrSetName.AttrName (or just AttrName if not part of a set). | |
| FGameplayEffectContextHandle | GetEffectContext
(
FGameplayEffectSpecHandle SpecHandle |
Gets the GameplayEffectSpec's effect context handle | |
| float | GetFloatAttribute
(
const AActor* Actor, |
Returns the value of Attribute from the ability system component belonging to Actor. | |
| float | GetFloatAttributeBase
(
const AActor* Actor, |
Returns the base value of Attribute from the ability system component belonging to Actor. | |
| float | GetFloatAttributeBaseFromAbilitySystemComponent
(
const UAbilitySystemComponent* AbilitySystemComponent, |
Returns the base value of Attribute from the ability system component AbilitySystemComponent. | |
| float | GetFloatAttributeFromAbilitySystemComponent
(
const UAbilitySystemComponent* AbilitySystem, |
Returns the value of Attribute from the ability system component AbilitySystem. | |
| const UGameplayAbility * | GetGameplayAbilityFromSpecHandle
(
UAbilitySystemComponent* AbilitySystem, |
GameplayAbility | |
| bool | GetGameplayCueDirection
(
AActor* TargetActor, |
Gets the best normalized effect direction for this gameplay cue. | |
| bool | GetGameplayCueEndLocationAndNormal
(
AActor* TargetActor, |
Gets the best end location and normal for this gameplay cue. | |
| const UGameplayEffect * | GetGameplayEffectFromActiveEffectHandle
(
const FActiveGameplayEffectHandle& ActiveHandle |
Returns the Gameplay Effect CDO from an active handle. | |
| const UGameplayEffectUIData * | GetGameplayEffectUIData
(
TSubclassOf< UGameplayEffect > EffectClass, |
Returns the UI data for a gameplay effect class (if any) | |
| FHitResult | GetHitResult
(
FGameplayCueParameters Parameters |
Returns a hit result stored in the effect context if valid | |
| FHitResult | GetHitResultFromTargetData
(
const FGameplayAbilityTargetDataHandle& HitResult, |
Returns the hit result for a given index if it exists | |
| AActor * | GetInstigatorActor
(
FGameplayCueParameters Parameters |
Gets the instigating actor (that holds the ability system component) of the GameplayCue | |
| FTransform | GetInstigatorTransform
(
FGameplayCueParameters Parameters |
Gets instigating world location | |
| float | GetModifiedAttributeMagnitude
(
FGameplayEffectSpecHandle SpecHandle, |
GameplayEffectSpec | |
| float | GetModifiedAttributeMagnitude
(
const FGameplayEffectSpec& SpecHandle, |
Helper function that may be useful to call from native as well | |
| FVector | GetOrigin
(
FGameplayCueParameters Parameters |
Gets instigating world location | |
| FVector | GetTargetDataEndPoint
(
const FGameplayAbilityTargetDataHandle& TargetData, |
Returns the end point for a given index if it exists | |
| FTransform | GetTargetDataEndPointTransform
(
const FGameplayAbilityTargetDataHandle& TargetData, |
Returns the end point transform for a given index if it exists | |
| FTransform | GetTargetDataOrigin
(
const FGameplayAbilityTargetDataHandle& TargetData, |
Returns the origin for a given index if it exists | |
| bool | HasHitResult
(
FGameplayCueParameters Parameters |
Checks if the effect context has a hit reslt stored inside | |
| bool | IsInstigatorLocallyControlled
(
FGameplayCueParameters Parameters |
GameplayCue | |
| bool | IsInstigatorLocallyControlledPlayer
(
FGameplayCueParameters Parameters |
Returns true if the ability system component that spawned this cue is locally controlled and a player | |
| bool | IsValid
(
FGameplayAttribute Attribute |
Attribute Returns true if the attribute actually exists | |
| FGameplayTargetDataFilterHandle | MakeFilterHandle
(
FGameplayTargetDataFilter Filter, |
Create a handle for filtering target data, filling out all fields | |
| FGameplayCueParameters | MakeGameplayCueParameters
(
float NormalizedMagnitude, |
Native make, to avoid having to deal with quantized vector types | |
| FGameplayEffectSpecHandle | MakeSpecHandle
(
UGameplayEffect* InGameplayEffect, |
Create a spec handle, filling out all fields | |
| bool | NotEqual_ActiveGameplayEffectHandle
(
const FActiveGameplayEffectHandle& A, |
Inequality operator for two Active Gameplay Effect Handles | |
| bool | NotEqual_GameplayAbilitySpecHandle
(
const FGameplayAbilitySpecHandle& A, |
Inequality operator for two Gameplay Ability Spec Handles | |
| bool | NotEqual_GameplayAttributeGameplayAttribute
(
FGameplayAttribute AttributeA, |
Simple inequality operator for gameplay attributes | |
| bool | RemoveLooseGameplayTags
(
AActor* Actor, |
Manually removes a set of tags from a given actor, with optional replication. | |
| void | SendGameplayEventToActor
(
AActor* Actor, |
This function can be used to trigger an ability on the actor in question with useful payload data. | |
| FGameplayEffectSpecHandle | SetDuration
(
FGameplayEffectSpecHandle SpecHandle, |
Manually sets the duration on a specific effect | |
| FGameplayEffectSpecHandle | SetStackCount
(
FGameplayEffectSpecHandle SpecHandle, |
Sets the GameplayEffectSpec's StackCount to the specified amount (prior to applying) | |
| FGameplayEffectSpecHandle | SetStackCountToMax
(
FGameplayEffectSpecHandle SpecHandle |
Sets the GameplayEffectSpec's StackCount to the max stack count defined in the GameplayEffect definition | |
| bool | TargetDataHasActor
(
const FGameplayAbilityTargetDataHandle& TargetData, |
Returns true if the given TargetData has at least 1 actor targeted | |
| bool | TargetDataHasEndPoint
(
const FGameplayAbilityTargetDataHandle& TargetData, |
Returns true if the target data has an end point | |
| bool | TargetDataHasHitResult
(
const FGameplayAbilityTargetDataHandle& HitResult, |
Returns true if the target data has a hit result | |
| bool | TargetDataHasOrigin
(
const FGameplayAbilityTargetDataHandle& TargetData, |
Returns true if the target data has an origin |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| FGameplayEffectSpecHandle | AddLinkedGameplayEffect
(
FGameplayEffectSpecHandle SpecHandle, |
Linked GameplayEffects aren't replicated. The new UAdditionalGameplayEffectsComponent renders this functionality obsolete (and since it's configured in the Asset, it is properly synced). | |
| FGameplayEffectSpecHandle | AddLinkedGameplayEffectSpec
(
FGameplayEffectSpecHandle SpecHandle, |
Linked GameplayEffects aren't replicated. The new UAdditionalGameplayEffectsComponent renders this functionality obsolete (and since it's configured in the Asset, it is properly synced). | |
| TArray< FGameplayEffectSpecHandle > | GetAllLinkedGameplayEffectSpecHandles
(
FGameplayEffectSpecHandle SpecHandle |
Linked GameplayEffects aren't replicated. The new UAdditionalGameplayEffectsComponent renders this functionality obsolete (and since it's configured in the Asset, it is properly synced). |