Module |
|
Header |
/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/Abilities/GameplayAbility.h |
Include |
#include "Abilities/GameplayAbility.h" |
[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(Blueprintable)
class UGameplayAbility :
public UObject,
public IGameplayTaskOwnerInterface
Abilities define custom gameplay logic that can be activated by players or external game logic
Name | Description | ||
---|---|---|---|
|
AbilityTags |
Public variables, exposed for backwards compatibility This ability has these tags |
|
|
AbilityTriggers |
Triggers to determine if this ability should execute in response to an event |
|
|
ActivationBlockedTags |
This ability is blocked if the activating actor/component has any of these tags |
|
|
ActivationOwnedTags |
Tags to apply to activating owner while this ability is active |
|
|
ActivationRequiredTags |
This ability can only be activated if the activating actor/component has all of these tags |
|
|
ActiveTasks |
List of currently active tasks, do not modify directly |
|
|
bHasBlueprintActivate |
||
|
bHasBlueprintActivateFromEvent |
||
|
bHasBlueprintCanUse |
||
|
bHasBlueprintShouldAbilityRespondToEvent |
||
|
bIsAbilityEnding |
True if the end ability has been called, but has not yet completed. |
|
|
bIsActive |
True if the ability is currently active. For instance per owner abilities |
|
|
bIsBlockingOtherAbilities |
True if the ability block flags are currently enabled |
|
|
bIsCancelable |
True if the ability is currently cancelable, if not will only be canceled by hard EndAbility calls |
|
|
BlockAbilitiesWithTag |
Abilities with these tags are blocked while this ability is active |
|
|
bMarkPendingKillOnAbilityEnd |
Flag that is set by AbilitySystemComponent::OnRemoveAbility to indicate the ability needs to be cleaned up in AbilitySystemComponent::NotifyAbilityEnded |
|
|
bReplicateInputDirectly |
If true, this ability will always replicate input press/release events to the server. |
|
|
bRetriggerInstancedAbility |
If true, and trying to activate an already active instanced ability, end it and re-trigger it. |
|
|
bServerRespectsRemoteAbilityCancellation |
If this is set, the server-side version of the ability can be canceled by the client-side version. |
|
|
CancelAbilitiesWithTag |
Ability exclusion / canceling |
|
|
CancelTaskInstanceNames |
||
|
TSubclassOf< cl... |
CooldownGameplayEffectClass |
This GameplayEffect represents the cooldown. |
|
TSubclassOf< cl... |
CostGameplayEffectClass |
This GameplayEffect represents the cost (mana, stamina, etc) of the ability. |
|
CurrentActivationInfo |
This is information specific to this instance of the ability. |
|
|
const FGameplay... |
CurrentActorInfo |
This is shared, cached information about the thing using us E.g, Actor*, MovementComponent*, AnimInstance, etc. |
|
CurrentEventData |
Information specific to this instance of the ability, if it was activated by an event |
|
|
UAnimMontage &#... |
CurrentMontage |
Active montage being played by this ability |
|
CurrentSpecHandle |
For instanced abilities |
|
|
EndTaskInstanceNames |
||
|
TEnumAsByte< EG... |
InstancingPolicy |
How the ability is instanced when executed. |
|
TEnumAsByte< EG... |
NetExecutionPolicy |
How does an ability execute on the network. |
|
TEnumAsByte< EG... |
NetSecurityPolicy |
What protections does this ability have? Should the client be allowed to request changes to the execution of the ability? |
|
OnConfirmDelegate |
Callback for when this ability has been confirmed by the server |
|
|
OnGameplayAbilityCancelled |
Notification that the ability is being cancelled. Called before OnGameplayAbilityEnded. |
|
|
OnGameplayAbilityEnded |
Notification that the ability has ended. Set using TryActivateAbility. |
|
|
OnGameplayAbilityEndedWithData |
Notification that the ability has ended with data on how it was ended |
|
|
OnGameplayAbilityStateEnded |
Used by the ability state task to handle when a state is ended |
|
|
RemoteInstanceEnded |
Set when the remote instance of this ability has ended (but the local instance may still be running or finishing up |
|
|
TEnumAsByte< EG... |
ReplicationPolicy |
Protected properties |
|
ScopeLockCount |
A count of all the current scope locks. |
|
|
SourceBlockedTags |
This ability is blocked if the source actor/component has any of these tags |
|
|
SourceRequiredTags |
This ability can only be activated if the source actor/component has all of these tags |
|
|
TargetBlockedTags |
This ability is blocked if the target actor/component has any of these tags |
|
|
TargetRequiredTags |
This ability can only be activated if the target actor/component has all of these tags |
|
|
TaskDebugMessages |
Tasks can emit debug messages throughout their life for debugging purposes. |
|
|
TrackedGameplayCues |
GameplayCues that were added during this ability that will get automatically removed when it ends |
|
|
WaitingToExecute |
A list of all the functions waiting for the scope lock to end so they can run. |
Name | Description | |
---|---|---|
|
UGameplayAbility ( |
Name | Description | ||
---|---|---|---|
|
ActivateAbility ( |
Actually activate ability, do not call this directly |
|
|
AddAbilityTaskDebugMessage ( |
Adds a debug message to display to the user |
|
|
ApplyAbilityTagsToGameplayEffectSpec ( |
Add the Ability's tags to the given GameplayEffectSpec. |
|
|
ApplyCooldown ( |
Applies CooldownGameplayEffect to the target |
|
|
ApplyCost ( |
Applies the ability's cost to the target |
|
|
FActiveGamep... |
ApplyGameplayEffectSpecToOwner ( |
|
|
ApplyGameplayEffectSpecToTarget ( |
||
|
FActiveGamep... |
ApplyGameplayEffectToOwner ( |
Non blueprintcallable, safe to call on CDO/NonInstance abilities |
|
ApplyGameplayEffectToTarget ( |
Non blueprintcallable, safe to call on CDO/NonInstance abilities |
|
|
FActiveGamep... |
BP_ApplyGameplayEffectToOwner ( |
Apply Gameplay effects to Self Apply a gameplay effect to the owner of this ability |
|
BP_ApplyGameplayEffectToTarget ( |
Apply Gameplay effects to Target Apply a gameplay effect to a Target |
|
|
BP_RemoveGameplayEffectFromOwnerWithAssetTags ( |
Remove Gameplay effects from Self |
|
|
BP_RemoveGameplayEffectFromOwnerWithGrantedTags ( |
Removes GameplayEffects from owner which grant the given tags |
|
|
BP_RemoveGameplayEffectFromOwnerWithHandle ( |
Removes GameplayEffect from owner that match the given handle |
|
|
CallActivateAbility ( |
Executes PreActivate and ActivateAbility |
|
|
CanActivateAbility ( |
CanActivateAbility Returns true if this ability can be activated right now. Has no side effects |
|
|
CanBeCanceled() |
Returns true if this ability can be canceled |
|
|
CancelAbility ( |
CancelAbility |
|
|
CancelTaskByInstanceName ( |
Add any task with this instance name to a list to be canceled (not ended) next frame. |
|
|
CheckCooldown ( |
Checks cooldown. returns true if we can be used again. False if not |
|
|
CheckCost ( |
Checks cost. returns true if we can pay for the ability. False if not |
|
|
CommitAbility ( |
||
|
CommitAbilityCooldown ( |
||
|
CommitAbilityCost ( |
||
|
CommitCheck ( |
The last chance to fail before committing, this will usually be the same as CanActivateAbility. |
|
|
CommitExecute ( |
Does the commit atomically (consume resources, do cooldowns, etc) |
|
|
ConfirmActivateSucceed() |
Called on a predictive ability when the server confirms its execution |
|
|
ConfirmTaskByInstanceName |
Ability Tasks |
|
|
DecrementListLock() |
Decreases the scope lock count. Runs the waiting to execute delegates if the count drops to zero. |
|
|
DoesAbilitySatisfyTagRequirements ( |
Returns true if none of the ability's tags are blocked and if it doesn't have a "Blocking" tag and has all "Required" tags. |
|
|
EndAbility ( |
Native function, called if an ability ends normally or abnormally. |
|
|
EndAbilityState ( |
Ends any active ability state task with the given name. |
|
|
EndOrCancelTasksByInstanceName() |
Internal function, cancels all the tasks we asked to cancel last frame (by instance name). |
|
|
EndTaskByInstanceName ( |
Add any task with this instance name to a list to be ended (not canceled) next frame. |
|
|
GetAbilityLevel ( |
Returns current ability level for non instanced abilities. |
|
|
GetAbilityLevel() |
Ability Levels and source objects Returns current level of the Ability |
|
|
GetAbilityLevel_BP ( |
Returns current ability level for non instanced abilities. |
|
|
UAbilitySyst... |
GetAbilitySystemComponentFromActorInfo() |
Returns the AbilitySystemComponent that is activating this ability |
|
UAbilitySyst... |
GetAbilitySystemComponentFromActorInfo_Checked() |
Returns the AbilitySystemComponent that is activating this ability |
|
UAbilitySyst... |
GetAbilitySystemComponentFromActorInfo_Ensured() |
Returns the AbilitySystemComponent that is activating this ability |
|
FGameplayAbi... |
GetActorInfo() |
Returns the actor info associated with this ability, has cached pointers to useful objects |
|
AActor * |
GetAvatarActorFromActorInfo() |
Returns the physical actor that is executing this ability. May be null |
|
FGameplayEff... |
GetContextFromOwner ( |
Generates a GameplayEffectContextHandle from our owner and an optional TargetData. |
|
UGameplayEff... |
GetCooldownGameplayEffect() |
Returns the gameplay effect used to determine cooldown |
|
const FGamep... |
GetCooldownTags() |
Returns all tags that are currently on cooldown |
|
float |
GetCooldownTimeRemaining() |
Returns the time in seconds remaining on the currently active cooldown. |
|
float |
GetCooldownTimeRemaining ( |
Returns the time in seconds remaining on the currently active cooldown. |
|
GetCooldownTimeRemainingAndDuration ( |
Returns the time in seconds remaining on the currently active cooldown and the original duration for this cooldown. |
|
|
UGameplayEff... |
GetCostGameplayEffect() |
Returns the gameplay effect used to apply cost |
|
FGameplayAbi... |
GetCurrentAbilitySpec() |
Retrieves the actual AbilitySpec for this ability. Can only be called on instanced abilities. |
|
FGameplayAbi... |
GetCurrentAbilitySpecHandle() |
Gets the current AbilitySpecHandle- can only be called on instanced abilities. |
|
FGameplayAbi... |
GetCurrentActivationInfo() |
Gets the current activation info bound to this ability - can only be called on instanced abilities. |
|
FGameplayAbi... |
GetCurrentActivationInfoRef() |
Gets the current activation info bound to this ability - can only be called on instanced abilities. |
|
const FGamep... |
GetCurrentActorInfo() |
Gets the current actor info bound to this ability - can only be called on instanced abilities. |
|
UAnimMontage... |
GetCurrentMontage() |
Animation Returns the currently playing montage for this ability, if any |
|
UObject *... |
GetCurrentSourceObject() |
Retrieves the SourceObject associated with this ability. Can only be called on instanced abilities. |
|
FGameplayEff... |
GetGrantedByEffectContext() |
Retrieves the EffectContext of the GameplayEffect that granted this ability. |
|
EGameplayAbi... |
GetInstancingPolicy() |
The important functions: CanActivateAbility() - const function to see if ability is activatable. |
|
EGameplayAbi... |
GetNetExecutionPolicy() |
Where does an ability execute on the network? Does a client "ask and predict", "ask and wait", "don't ask (just do it)" |
|
EGameplayAbi... |
GetNetSecurityPolicy() |
Where should an ability execute on the network? Provides protection from clients attempting to execute restricted abilities. |
|
AActor * |
GetOwningActorFromActorInfo() |
Returns the actor that owns this ability, which may not have a physical location |
|
USkeletalMes... |
GetOwningComponentFromActorInfo() |
Convenience method for abilities to get skeletal mesh component - useful for aiming abilities |
|
EGameplayAbi... |
GetReplicationPolicy() |
How an ability replicates state/events to everyone on the network |
|
UObject *... |
GetSourceObject ( |
Retrieves the SourceObject associated with this ability. Callable on non instanced |
|
UObject *... |
GetSourceObject_BP ( |
Retrieves the SourceObject associated with this ability. Callable on non instanced |
|
UWorld * |
GetWorld() |
|
|
HasAuthority ( |
True if this is the server or single player |
|
|
HasAuthorityOrPredictionKey ( |
True if we are authority or we have a valid prediciton key that is expected to work |
|
|
IncrementListLock() |
Increases the scope lock count. |
|
|
InputPressed ( |
Input Input binding stub. |
|
|
InputReleased ( |
Input binding stub. |
|
|
InvalidateClientPredictionKey() |
Invalidates the current prediction key. |
|
|
IsActive() |
Returns true if the ability is currently active |
|
|
IsBlockingOtherAbilities() |
Returns true if this ability is blocking other abilities |
|
|
IsEndAbilityValid ( |
Check if the ability can be ended |
|
|
IsForRemoteClient() |
True if this is on the server and is being executed for a non-local player, false in single player |
|
|
IsInstantiated() |
True if this has been instanced, always true for blueprints |
|
|
IsLocallyControlled() |
True if the owning actor is locally controlled, true in single player |
|
|
IsMarkPendingKillOnAbilityEnd() |
Is bMarkPendingKillOnAbilityEnd set |
|
|
IsPredictingClient() |
Is this ability running on a a predicting client, this is false in single player |
|
|
IsTriggered() |
Is this ability triggered from TriggerData (or is it triggered explicitly through input/game code) |
|
|
K2_ActivateAbility() |
ActivateAbility |
|
|
K2_ActivateAbilityFromEvent ( |
||
|
K2_AddGameplayCue ( |
Adds a persistent gameplay cue to the ability owner. Optionally will remove if ability ends |
|
|
K2_AddGameplayCueWithParams ( |
Adds a persistent gameplay cue to the ability owner. Optionally will remove if ability ends |
|
|
FActiveGamep... |
K2_ApplyGameplayEffectSpecToOwner ( |
Apply a previously created gameplay effect spec to the owner of this ability |
|
K2_ApplyGameplayEffectSpecToTarget ( |
Apply a previously created gameplay effect spec to a target |
|
|
K2_CanActivateAbility ( |
CanActivate Returns true if this ability can be activated right now. Has no side effects |
|
|
K2_CancelAbility() |
Call from Blueprint to cancel the ability naturally |
|
|
K2_CheckAbilityCooldown() |
Checks the ability's cooldown, but does not apply it. |
|
|
K2_CheckAbilityCost() |
Checks the ability's cost, but does not apply it. |
|
|
K2_CommitAbility() |
CommitAbility |
|
|
K2_CommitAbilityCooldown |
Attempts to commit the ability's cooldown only. |
|
|
K2_CommitAbilityCost ( |
Attempts to commit the ability's cost only. |
|
|
K2_CommitExecute() |
BP event called from CommitAbility |
|
|
K2_EndAbility() |
EndAbility Call from kismet to end the ability naturally |
|
|
K2_ExecuteGameplayCue ( |
GameplayCue Abilities can invoke GameplayCues without having to create GameplayEffects |
|
|
K2_ExecuteGameplayCueWithParams ( |
Invoke a gameplay cue on the ability owner, with extra parameters |
|
|
K2_HasAuthority() |
||
|
K2_OnEndAbility ( |
Kismet event, will be called if an ability ends normally or abnormally |
|
|
K2_RemoveGameplayCue ( |
Removes a persistent gameplay cue from the ability owner |
|
|
K2_ShouldAbilityRespondToEvent ( |
ShouldAbilityRespondToEvent |
|
|
FGameplayEff... |
MakeEffectContext ( |
Returns an effect context, given a specified actor info |
|
FGameplayEff... |
MakeOutgoingGameplayEffectSpec ( |
Convenience method for abilities to get outgoing gameplay effect specs (for example, to pass on to projectiles to apply to whoever they hit) |
|
FGameplayEff... |
MakeOutgoingGameplayEffectSpec ( |
Native version of above function |
|
FGameplayAbi... |
MakeTargetLocationInfoFromOwnerActor() |
Target Data Creates a target location from where the owner avatar is |
|
FGameplayAbi... |
MakeTargetLocationInfoFromOwnerSkeletalMeshComponent ( |
Creates a target location from a socket on the owner avatar's skeletal mesh |
|
MontageJumpToSection ( |
Animation Immediately jumps the active montage to a section |
|
|
MontageSetNextSectionName |
Sets pending section on active montage |
|
|
MontageStop ( |
Stops the current animation montage. |
|
|
NotifyAbilityTaskWaitingOnAvatar ( |
Called to inform the ability that a task is waiting for the player's avatar to do something in world |
|
|
NotifyAbilityTaskWaitingOnPlayerData ( |
Called to inform the ability that a task is waiting for the player to do something |
|
|
NotifyAvatarDestroyed() |
Called to inform the ability that the AvatarActor has been replaced. |
|
|
OnAvatarSet ( |
Called when the avatar actor is set/changes |
|
|
OnGiveAbility ( |
Called when the ability is given to an AbilitySystemComponent |
|
|
OnRemoveAbility ( |
Called when the ability is removed from an AbilitySystemComponent |
|
|
OnWaitingForConfirmInputBegin() |
Called from AbilityTask_WaitConfirmCancel to handle input confirming |
|
|
OnWaitingForConfirmInputEnd() |
||
|
PostNetInit() |
Setters for temporary execution data |
|
|
PreActivate ( |
Do boilerplate init stuff and then call ActivateAbility |
|
|
RemoveGrantedByEffect() |
Removes the GameplayEffect that granted this ability. Can only be called on instanced abilities. |
|
|
SendGameplayEvent ( |
Sends a gameplay event, also creates a prediction window |
|
|
SetCanBeCanceled ( |
Sets whether the ability should ignore cancel requests. Only valid on instanced abilities |
|
|
SetCurrentActivationInfo ( |
Modifies activation info, only safe on instanced abilities |
|
|
SetCurrentActorInfo ( |
Modifies actor info, only safe on instanced abilities |
|
|
SetCurrentInfo ( |
Sets both actor and activation info |
|
|
SetCurrentMontage ( |
Call to set/get the current montage from a montage task. |
|
|
SetMarkPendingKillOnAbilityEnd ( |
Setter for the bMarkPendingKillOnAbilityEnd |
|
|
SetMovementSyncPoint ( |
Movement Sync |
|
|
SetRemoteInstanceHasEnded() |
Interaction with ability system component |
|
|
SetShouldBlockOtherAbilities ( |
Sets rather ability block flags are enabled or disabled. Only valid on instanced abilities |
|
|
ShouldAbilityRespondToEvent ( |
Returns true if this ability can be triggered right now. Has no side effects |
|
|
ShouldActivateAbility ( |
Returns true if an an ability should be activated |
|
|
ShouldReplicateAbilitySpec ( |
Takes in the ability spec and checks if we should allow replication on the ability spec, this will NOT stop replication of the ability UObject just the spec inside the UAbilitySystemComponenet ActivatableAbilities for this ability |
Name | Description | ||
---|---|---|---|
|
CallRemoteFunction ( |
Call the actor's function remotely |
|
|
GetFunctionCallspace |
Return the space this function should be called. |
|
|
IsSupportedForNetworking() |
IsSupportedForNetworking means an object can be referenced over the network |
Name | Description | ||
---|---|---|---|
|
AActor * |
GetGameplayTaskAvatar ( |
Get "body" of task's owner / default, having location in world (e.g. Owner = AIController, Avatar = Pawn) |
|
AActor * |
GetGameplayTaskOwner ( |
Get owner of a task or default one when task is null |
|
UGameplayTas... |
GetGameplayTasksComponent ( |
Finds tasks component for given GameplayTask, Task.GetGameplayTasksComponent() may not be initialized at this point! |
|
OnGameplayTaskActivated ( |
Notify called after GameplayTask changes state to Active (initial activation or resuming) |
|
|
OnGameplayTaskDeactivated ( |
Notify called after GameplayTask changes state from Active (finishing or pausing) |
|
|
OnGameplayTaskInitialized ( |
Notify called after GameplayTask finishes initialization (not active yet) |