G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
UAbilitySystemComponent Class Reference

The core ActorComponent for interfacing with the GameplayAbilities System. More...

Public Member Functions

Ability System | Gameplay Cues
void RemoveGameplayCue (const FGameplayTag GameplayCueTag)
void ExecuteGameplayCueWithEffectContext (const FGameplayTag GameplayCueTag, FGameplayEffectContextHandle EffectContext)
void ExecuteGameplayCueWithParameters (const FGameplayTag GameplayCueTag, FGameplayCueParameters GameplayCueParameters)
void RemoveAllGameplayCues ()
void InitDefaultGameplayCueParameters (FGameplayCueParameters &Parameters)
void AddGameplayCueWithParameters (const FGameplayTag GameplayCueTag, FGameplayCueParameters GameplayCueParameters)
void AddGameplayCueWithEffectContext (const FGameplayTag GameplayCueTag, FGameplayEffectContextHandle EffectContext)
Ability System | Gameplay Tags
void AddLooseGameplayTag (FGameplayTag GameplayTag, int Count=1)
bool AreAbilityTagsBlocked (FGameplayTagContainer Tags) const
void AddReplicatedLooseGameplayTags (FGameplayTagContainer GameplayTags)
void GetOwnedGameplayTags (FGameplayTagContainer &TagContainer) const
void SetReplicatedLooseGameplayTagCount (FGameplayTag GameplayTag, int NewCount)
void AddReplicatedLooseGameplayTag (FGameplayTag GameplayTag)
void SetLooseGameplayTagCount (FGameplayTag GameplayTag, int NewCount)
void AddLooseGameplayTags (FGameplayTagContainer GameplayTags, int Count=1)
void RemoveReplicatedLooseGameplayTags (FGameplayTagContainer GameplayTags)
void RemoveReplicatedLooseGameplayTag (FGameplayTag GameplayTag)
void RemoveLooseGameplayTag (FGameplayTag GameplayTag, int Count=1)
void RemoveLooseGameplayTags (FGameplayTagContainer GameplayTags, int Count=1)
Gameplay Abilities
void GetAllAbilities (TArray< FGameplayAbilitySpecHandle > &OutAbilityHandles) const
 Returns an array with all granted ability handles NOTE: currently this doesn't include abilities that are mid-activation.
FGameplayAbilitySpecHandle GiveAbilityAndActivateOnce (TSubclassOf< UGameplayAbility > AbilityClass, int Level=0, int InputID=- 1)
 Grants a Gameplay Ability, activates it once, and removes it. This will be ignored if the actor is not authoritative.
void FindAllAbilitiesWithTags (TArray< FGameplayAbilitySpecHandle > &OutAbilityHandles, FGameplayTagContainer Tags, bool bExactMatch=true) const
 Returns an array with all abilities that match the provided tags.
void FindAllAbilitiesWithInputID (TArray< FGameplayAbilitySpecHandle > &OutAbilityHandles, int InputID=0) const
 Returns an array with all abilities bound to an Input ID value.
void PressInputID (int InputID)
 Sends a local player Input Pressed event with the provided Input ID, notifying any bound abilities.
void ClearAllAbilities ()
 Wipes all 'given' abilities. This will be ignored if the actor is not authoritative.
void ClearAbility (FGameplayAbilitySpecHandle Handle)
 Removes the specified ability. This will be ignored if the actor is not authoritative.
void InputConfirm ()
 Sends a local player Input Confirm event, notifying abilities.
void InputCancel ()
 Sends a local player Input Cancel event, notifying abilities.
void FindAllAbilitiesMatchingQuery (TArray< FGameplayAbilitySpecHandle > &OutAbilityHandles, FGameplayTagQuery Query) const
 Returns an array with all abilities that match the provided Gameplay Tag Query.
FGameplayAbilitySpecHandle GiveAbility (TSubclassOf< UGameplayAbility > AbilityClass, int Level=0, int InputID=- 1)
 Grants a Gameplay Ability and returns its handle. This will be ignored if the actor is not authoritative.
void ClearAllAbilitiesWithInputID (int InputID=0)
 Clears all abilities bound to a given Input ID This will be ignored if the actor is not authoritative.
void ReleaseInputID (int InputID)
 Sends a local player Input Released event with the provided Input ID, notifying any bound abilities.
Gameplay Attributes
void GetAllAttributes (TArray< FGameplayAttribute > &OutAttributes)
 Returns a list of all attributes for this abilty system component.
const UAttributeSet GetAttributeSet (TSubclassOf< UAttributeSet > AttributeSetClass) const
 Returns a reference to the Attribute Set instance, if one exists in this component.
float32 GetGameplayAttributeValue (FGameplayAttribute Attribute, bool &bFound) const
 Returns the current value of the given gameplay attribute, or zero if the attribute is not found. NOTE: This doesn't take predicted gameplay effect modifiers into consideration, so the value may not be accurate on clients at all times.
Gameplay Tags
int GetGameplayTagCount (FGameplayTag GameplayTag) const
 Returns the current count of the given gameplay tag. This includes both loose tags, and tags granted by gameplay effects and abilities. This function can be called on the client, but it may not display the most current count on the server.
GameplayCue
bool IsGameplayCueActive (const FGameplayTag GameplayCueTag) const
 Allows polling to see if a GameplayCue is active. We expect most GameplayCue handling to be event based, but some cases we may need to check if a GameplayCue is active (Animation Blueprint for example).
GameplayEffects
void SetActiveGameplayEffectLevelUsingQuery (FGameplayEffectQuery Query, int NewLevel)
 Updates the level of an already applied gameplay effect. The intention is that this is 'seemless' and doesnt behave like removing/reapplying.
void UpdateActiveGameplayEffectSetByCallerMagnitudes (FActiveGameplayEffectHandle ActiveHandle, TMap< FGameplayTag, float32 > NewSetByCallerValues)
 Dynamically update multiple set-by-caller magnitudes for an active gameplay effect.
TArray< FActiveGameplayEffectHandle > GetActiveEffectsWithAllTags (FGameplayTagContainer Tags) const
 Returns list of active effects that have all of the passed in tags.
int RemoveActiveEffectsWithGrantedTags (FGameplayTagContainer Tags)
 Removes all active effects that grant any of the tags in Tags.
void SetActiveGameplayEffectLevel (FActiveGameplayEffectHandle ActiveHandle, int NewLevel)
 Updates the level of an already applied gameplay effect. The intention is that this is 'seemless' and doesnt behave like removing/reapplying.
FActiveGameplayEffectHandle ApplyGameplayEffectToSelf (TSubclassOf< UGameplayEffect > GameplayEffectClass, float32 Level, FGameplayEffectContextHandle EffectContext)
 Apply a gameplay effect to self.
void RemoveActiveGameplayEffectBySourceEffect (TSubclassOf< UGameplayEffect > GameplayEffect, UAbilitySystemComponent InstigatorAbilitySystemComponent, int StacksToRemove=- 1)
 Remove active gameplay effects whose backing definition are the specified gameplay effect class.
int GetGameplayEffectCount (TSubclassOf< UGameplayEffect > SourceGameplayEffect, UAbilitySystemComponent OptionalInstigatorFilterComponent, bool bEnforceOnGoingCheck=true) const
 Get the count of the specified source effect on the ability system component. For non-stacking effects, this is the sum of all active instances. For stacking effects, this is the sum of all valid stack counts. If an instigator is specified, only effects from that instigator are counted.
bool RemoveActiveGameplayEffect (FActiveGameplayEffectHandle Handle, int StacksToRemove=- 1)
 Removes GameplayEffect by Handle. StacksToRemove=-1 will remove all stacks.
FActiveGameplayEffectHandle ApplyGameplayEffectToTarget (TSubclassOf< UGameplayEffect > GameplayEffectClass, UAbilitySystemComponent Target, float32 Level, FGameplayEffectContextHandle Context)
 Apply a gameplay effect to passed in target.
FActiveGameplayEffectHandle ApplyGameplayEffectSpecToSelf (FGameplayEffectSpecHandle SpecHandle)
 Applies a previously created gameplay effect spec to this component.
int GetGameplayEffectCount_IfLoaded (TSoftClassPtr< UGameplayEffect > SoftSourceGameplayEffect, UAbilitySystemComponent OptionalInstigatorFilterComponent, bool bEnforceOnGoingCheck=true) const
 Get the count of the specified source effect on the ability system component. For non-stacking effects, this is the sum of all active instances. For stacking effects, this is the sum of all valid stack counts. If an instigator is specified, only effects from that instigator are counted.
float32 GetGameplayEffectMagnitude (FActiveGameplayEffectHandle Handle, FGameplayAttribute Attribute) const
 Raw accessor to ask the magnitude of a gameplay effect, not necessarily always correct. How should outside code (UI, etc) ask things like 'how much is this gameplay effect modifying my damage by' (most likely we want to catch this on the backend - when damage is applied we can get a full dump/history of how the number got to where it is. But still we may need polling methods like below (how much would my damage be).
int RemoveActiveEffectsWithTags (FGameplayTagContainer Tags)
 Removes all active effects that contain any of the tags in Tags.
int RemoveActiveEffectsWithAppliedTags (FGameplayTagContainer Tags)
 Removes all active effects that apply any of the tags in Tags.
int RemoveActiveEffectsWithSourceTags (FGameplayTagContainer Tags)
 Removes all active effects with captured source tags that contain any of the tags in Tags.
FActiveGameplayEffectHandle ApplyGameplayEffectSpecToTarget (FGameplayEffectSpecHandle SpecHandle, UAbilitySystemComponent Target)
 Applies a previously created gameplay effect spec to a target.
void UpdateActiveGameplayEffectSetByCallerMagnitude (FActiveGameplayEffectHandle ActiveHandle, FGameplayTag SetByCallerTag, float32 NewValue)
 Dynamically update the set-by-caller magnitude for an active gameplay effect.
FGameplayEffectSpecHandle MakeOutgoingSpec (TSubclassOf< UGameplayEffect > GameplayEffectClass, float32 Level, FGameplayEffectContextHandle Context) const
 Get an outgoing GameplayEffectSpec that is ready to be applied to other things.
TArray< FActiveGameplayEffectHandle > GetActiveEffects (FGameplayEffectQuery Query) const
 Returns list of active effects, for a query.
FGameplayEffectContextHandle MakeEffectContext () const
 Create an EffectContext for the owner of this AbilitySystemComponent.
Functions
void ClientActivateAbilityFailed (FGameplayAbilitySpecHandle AbilityToActivate, int16 PredictionKey)
void RemoveAllSpawnedAttributes ()
FGameplayAbilitySpecHandle GiveAbility (FGameplayAbilitySpec Spec)
FGameplayAbilitySpecHandle GiveAbilityAndActivateOnce (FGameplayAbilitySpec &Spec)
void ClientTryActivateAbility (FGameplayAbilitySpecHandle AbilityToActivate)
void ClientPrintDebug_Response (TArray< FString > Strings, int GameFlags)
void ClientEndAbility (FGameplayAbilitySpecHandle AbilityToEnd, FGameplayAbilityActivationInfo ActivationInfo)
void ClientCancelAbility (FGameplayAbilitySpecHandle AbilityToCancel, FGameplayAbilityActivationInfo ActivationInfo)
void ServerCancelAbility (FGameplayAbilitySpecHandle AbilityToCancel, FGameplayAbilityActivationInfo ActivationInfo)
void ServerCurrentMontageJumpToSectionName (UAnimSequenceBase ClientAnimation, FName SectionName)
 RPC function called from CurrentMontageJumpToSection, replicates to other clients.
void ServerCurrentMontageSetNextSectionName (UAnimSequenceBase ClientAnimation, float32 ClientPosition, FName SectionName, FName NextSectionName)
 RPC function called from CurrentMontageSetNextSectionName, replicates to other clients.
void ServerCurrentMontageSetPlayRate (UAnimSequenceBase ClientAnimation, float32 InPlayRate)
 RPC function called from CurrentMontageSetPlayRate, replicates to other clients.
void ServerPrintDebug_Request ()
 Ask the server to send ability system debug information back to the client, via ClientPrintDebug_Response.
void ServerPrintDebug_RequestWithStrings (TArray< FString > Strings)
 Same as ServerPrintDebug_Request but this includes the client debug strings so that the server can embed them in replays.
void ServerSetInputPressed (FGameplayAbilitySpecHandle AbilityHandle)
 Direct Input state replication. These will be called if bReplicateInputDirectly is true on the ability and is generally not a good thing to use. (Instead, prefer to use Generic Replicated Events).
void ServerSetInputReleased (FGameplayAbilitySpecHandle AbilityHandle)
void RemoveSpawnedAttribute (UAttributeSet Attribute)
FGameplayAbilitySpecHandle GiveAbilityAndActivateOnceWithEventData (FGameplayAbilitySpec &Spec, FGameplayEventData EventData)
const TArray< UAttributeSet > & GetSpawnedAttributes () const
bool FindAbilitySpecFromInputID (int InputID, FGameplayAbilitySpec &OutSpec)
bool FindAbilitySpecFromHandle (const FGameplayAbilitySpecHandle Handle, FGameplayAbilitySpec &OutSpec)
bool FindAbilitySpecFromGEHandle (const FActiveGameplayEffectHandle Handle, FGameplayAbilitySpec &OutSpec)
bool FindAbilitySpecFromClass (const TSubclassOf< UGameplayAbility > InAbilityClass, FGameplayAbilitySpec &OutSpec)
void AddSpawnedAttribute (UAttributeSet Attribute)
void MarkAbilitySpecDirty (FGameplayAbilitySpec &Spec, bool bWasAddOrRemove=false)
void SendGameplayEvent (const FGameplayTag EventTag, FGameplayEventData Payload)
FGameplayTag FindMatchingOwnedTag (FGameplayTag Tag) const
 Given a tag, returns the first matching owned tag that is actually on the component.
FGameplayTagContainer FindMatchingOwnedTags (FGameplayTag Tag) const
 Given a tag, returns all matching owned tags that are actually on the component.
Public Member Functions inherited from UActorComponent
void Tick (float32 DeltaSeconds)
 Event called every frame if tick is enabled.
EComponentCreationMethod GetComponentCreationMethod () const
void SetbIsEditorOnly (bool Value)
void EndPlay (EEndPlayReason EndPlayReason)
 Blueprint implementable event for when the component ends play, generally via destruction or its Actor's EndPlay.
void BeginPlay ()
 Blueprint implementable event for when the component is beginning play, called before its owning actor's BeginPlay or when the component is dynamically created if the Actor has already BegunPlay.
void MarkRenderStateDirty ()
bool HasBegunPlay () const
void SetbTickInEditor (bool Value)
bool IsVisualizationComponent () const
void SetIsVisualizationComponent (bool Value)
void AsyncPhysicsTick (float32 DeltaSeconds, float32 SimSeconds)
 Event called every async physics tick if bAsyncPhysicsTickEnabled is true.
bool GetbReplicateUsingRegisteredSubObjectList () const
 When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.
void SetbReplicateUsingRegisteredSubObjectList (bool Value)
 When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.
bool GetbReplicates () const
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
void SetbReplicates (bool Value)
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
bool GetbAutoActivate () const
 Whether the component is activated at creation or must be explicitly activated.
void SetbAutoActivate (bool Value)
 Whether the component is activated at creation or must be explicitly activated.
void SetbEditableWhenInherited (bool Value)
 True if this component can be modified when it was inherited from a parent actor class.
void SetbCanEverAffectNavigation (bool Value)
 Whether this component can potentially influence navigation.
bool GetbIsEditorOnly () const
 If true, the component will be excluded from non-editor builds.
bool IsBeingDestroyed () const
 Returns whether the component is in the process of being destroyed.
void SetIsReplicated (bool ShouldReplicate)
 Enable or disable replication. This is the equivalent of RemoteRole for actors (only a bool is required for components).
void DestroyComponent (UObject Object)
 Unregister and mark for pending kill a component. This may not be used to destroy a component that is owned by an actor unless the owning actor is calling the function.
bool ComponentHasTag (FName Tag) const
 See if this component contains the supplied tag.
AActor GetOwner () const
 Follow the Outer chain to get the AActor that 'Owns' this component.
void SetAutoActivate (bool bNewAutoActivate)
 Sets whether the component should be auto activate or not. Only safe during construction scripts.
bool IsActive () const
 Returns whether the component is active or not.
void ToggleActive ()
 Toggles the active state of the component.
void SetActive (bool bNewActive, bool bReset=false)
 Sets whether the component is active or not.
void Activate (bool bReset=false)
 Activates the SceneComponent, should be overridden by native child classes.
void Deactivate ()
 Deactivates the SceneComponent.
float32 GetComponentTickInterval () const
 Returns the tick interval for this component's primary tick function, which is the frequency in seconds at which it will be executed.
void AddTickPrerequisiteActor (AActor PrerequisiteActor)
 Make this component tick after PrerequisiteActor.
void AddTickPrerequisiteComponent (UActorComponent PrerequisiteComponent)
 Make this component tick after PrerequisiteComponent.
void RemoveTickPrerequisiteComponent (UActorComponent PrerequisiteComponent)
 Remove tick dependency on PrerequisiteComponent.
void SetTickableWhenPaused (bool bTickableWhenPaused)
 Sets whether this component can tick when paused.
bool IsComponentTickEnabled () const
 Returns whether this component has tick enabled or not.
void SetTickGroup (ETickingGroup NewTickGroup)
 Changes the ticking group for this component.
void RemoveTickPrerequisiteActor (AActor PrerequisiteActor)
 Remove tick dependency on PrerequisiteActor.
void SetComponentTickIntervalAndCooldown (float32 TickInterval)
 Sets the tick interval for this component's primary tick function. Does not enable the tick interval. Takes effect imediately.
void SetComponentTickInterval (float32 TickInterval)
 Sets the tick interval for this component's primary tick function. Does not enable the tick interval. Takes effect on next tick.
void SetComponentTickEnabled (bool bEnabled)
 Set this component's tick functions to be enabled or disabled. Only has an effect if the function is registered.
Public Member Functions inherited from UObject
bool MarkPackageDirty () const
void RemoveFromRoot ()
bool GetIsRooted () const
bool IsTransient () const
bool Modify (bool bAlwaysMarkDirty=true)
void SetTransactional (bool bTransactional)
bool IsSupportedForNetworking () const
UClass GetClass () const
UObject GetOuter () const
UObject GetTypedOuter (TSubclassOf< UObject > Target) const
 Traverses the outer chain searching for the next object of a certain type.
UPackage GetOutermost () const
UPackage GetPackage () const
void AddToRoot ()
UWorld GetWorld () const
FName GetName () const
FString GetFullName (const UObject StopOuter=nullptr) const
FString GetPathName (const UObject StopOuter=nullptr) const
bool IsA (const UClass Class) const
 Returns true if this object is of the specified type, or a child of that type.
void SaveConfig ()
void LoadConfig ()
void ReloadConfig ()
void CopyScriptPropertiesFrom (const UObject OtherObject)
void opCast (?&Address) const
FString ToString () const

Static Public Member Functions

Static Functions
static UAbilitySystemComponent Get (const AActor Actor, FName WithName=NAME_None)
static UAbilitySystemComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static UAbilitySystemComponent Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from UGameplayTasksComponent
static UGameplayTasksComponent Get (const AActor Actor, FName WithName=NAME_None)
static UGameplayTasksComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static UGameplayTasksComponent Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from UActorComponent
static UActorComponent Get (const AActor Actor, FName WithName=NAME_None)
static UActorComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static UActorComponent Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from UObject
static UClass StaticClass ()

Public Attributes

AttributeTest
TArray< FAttributeDefaults > DefaultStartingData
Variables
bool UserAbilityActivationInhibited
 Rather activation is currently inhibited.
const TArray< UAttributeSet > SpawnedAttributes
 List of attribute sets.
Public Attributes inherited from UGameplayTasksComponent
FOnClaimedResourcesChangeSignature OnClaimedResourcesChange
Public Attributes inherited from UActorComponent
bool bAutoActivate
 Whether the component is activated at creation or must be explicitly activated.
TArray< TObjectPtr< UAssetUserData > > AssetUserData
 Array of user data stored with the component.
TArray< TObjectPtr< UAssetUserData > > AssetUserDataEditorOnly
 Array of user data stored with the component.
bool bReplicates
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
FActorComponentTickFunction PrimaryComponentTick
 Main tick function for the Component.
bool bIsEditorOnly
 If true, the component will be excluded from non-editor builds.
bool bReplicateUsingRegisteredSubObjectList
 When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.
TArray< FName > ComponentTags
 Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.
const EComponentCreationMethod ComponentCreationMethod
const AActor Owner
 Follow the Outer chain to get the AActor that 'Owns' this component.
FActorComponentDeactivateSignature OnComponentDeactivated
 Called when the component has been deactivated.
FActorComponentActivatedSignature OnComponentActivated
 Called when the component has been activated, with parameter indicating if it was from a reset.
float32 ComponentTickInterval
 Returns the tick interval for this component's primary tick function, which is the frequency in seconds at which it will be executed.
Public Attributes inherited from UObject
const UClass Class
const UObject Outer
const UPackage Outermost
const UPackage Package
const UWorld World
const FName Name
const bool IsRooted

Abilities

FGameplayAbilitySpecContainer ActivatableAbilities
 The abilities we can activate. -This will include CDOs for non instanced abilities and per-execution instanced abilities. -Actor-instanced abilities will be the actual instance (not CDO).
void TargetCancel ()
 Any active targeting actors will be stopped and canceled, not returning any targeting data.
void TargetConfirm ()
 Any active targeting actors will be told to stop and return current targeting data.
bool GetUserAbilityActivationInhibited () const
 This is meant to be used to inhibit activating an ability from an input perspective. (E.g., the menu is pulled up, another game mechanism is consuming all input, etc) This should only be called on locally owned players. This should not be used to game mechanics like silences or disables. Those should be done through gameplay effects.
void SetUserAbilityActivationInhibited (bool NewInhibit)
 Disable or Enable a local user from being able to activate abilities. This should only be used for input/UI etc related inhibition. Do not use for game mechanics.
bool TryActivateAbilitiesByTag (FGameplayTagContainer GameplayTagContainer, bool bAllowRemoteActivation=true)
 Attempts to activate every gameplay ability that matches the given tag and DoesAbilitySatisfyTagRequirements(). Returns true if anything attempts to activate. Can activate more than one ability and the ability may fail later. If bAllowRemoteActivation is true, it will remotely activate local/server abilities, if false it will only try to locally activate abilities.
bool TryActivateAbilityByClass (TSubclassOf< UGameplayAbility > InAbilityToActivate, bool bAllowRemoteActivation=true)
 Attempts to activate the ability that is passed in. This will check costs and requirements before doing so. Returns true if it thinks it activated, but it may return false positives due to failure later in activation. If bAllowRemoteActivation is true, it will remotely activate local/server abilities, if false it will only try to locally activate the ability.
bool TryActivateAbility (FGameplayAbilitySpecHandle AbilityToActivate, bool bAllowRemoteActivation=true)
 Attempts to activate the given ability, will check costs and requirements before doing so. Returns true if it thinks it activated, but it may return false positives due to failure later in activation. If bAllowRemoteActivation is true, it will remotely activate local/server abilities, if false it will only try to locally activate the ability.

Skills

FName AffectedAnimInstanceTag
 The linked Anim Instance that this component will play montages in. Use NAME_None for the main anim instance.
void InitStats (TSubclassOf< UAttributeSet > Attributes, const UDataTable DataTable)

Detailed Description

The core ActorComponent for interfacing with the GameplayAbilities System.

Member Function Documentation

◆ AddGameplayCueWithEffectContext()

void AddGameplayCueWithEffectContext ( const FGameplayTag GameplayCueTag,
FGameplayEffectContextHandle EffectContext )

◆ AddGameplayCueWithParameters()

void AddGameplayCueWithParameters ( const FGameplayTag GameplayCueTag,
FGameplayCueParameters GameplayCueParameters )

◆ AddLooseGameplayTag()

void AddLooseGameplayTag ( FGameplayTag GameplayTag,
int Count = 1 )

◆ AddLooseGameplayTags()

void AddLooseGameplayTags ( FGameplayTagContainer GameplayTags,
int Count = 1 )

◆ AddReplicatedLooseGameplayTag()

void AddReplicatedLooseGameplayTag ( FGameplayTag GameplayTag)

◆ AddReplicatedLooseGameplayTags()

void AddReplicatedLooseGameplayTags ( FGameplayTagContainer GameplayTags)

◆ AddSpawnedAttribute()

void AddSpawnedAttribute ( UAttributeSet Attribute)

◆ ApplyGameplayEffectSpecToSelf()

FActiveGameplayEffectHandle ApplyGameplayEffectSpecToSelf ( FGameplayEffectSpecHandle SpecHandle)

Applies a previously created gameplay effect spec to this component.

◆ ApplyGameplayEffectSpecToTarget()

FActiveGameplayEffectHandle ApplyGameplayEffectSpecToTarget ( FGameplayEffectSpecHandle SpecHandle,
UAbilitySystemComponent Target )

Applies a previously created gameplay effect spec to a target.

◆ ApplyGameplayEffectToSelf()

FActiveGameplayEffectHandle ApplyGameplayEffectToSelf ( TSubclassOf< UGameplayEffect > GameplayEffectClass,
float32 Level,
FGameplayEffectContextHandle EffectContext )

Apply a gameplay effect to self.

◆ ApplyGameplayEffectToTarget()

FActiveGameplayEffectHandle ApplyGameplayEffectToTarget ( TSubclassOf< UGameplayEffect > GameplayEffectClass,
UAbilitySystemComponent Target,
float32 Level,
FGameplayEffectContextHandle Context )

Apply a gameplay effect to passed in target.

◆ AreAbilityTagsBlocked()

bool AreAbilityTagsBlocked ( FGameplayTagContainer Tags) const

◆ ClearAbility()

void ClearAbility ( FGameplayAbilitySpecHandle Handle)

Removes the specified ability. This will be ignored if the actor is not authoritative.

Parameters
HandleAbility Spec Handle of the ability we want to remove

◆ ClearAllAbilities()

void ClearAllAbilities ( )

Wipes all 'given' abilities. This will be ignored if the actor is not authoritative.

◆ ClearAllAbilitiesWithInputID()

void ClearAllAbilitiesWithInputID ( int InputID = 0)

Clears all abilities bound to a given Input ID This will be ignored if the actor is not authoritative.

Parameters
InputIDThe numeric Input ID of the abilities to remove

◆ ClientActivateAbilityFailed()

void ClientActivateAbilityFailed ( FGameplayAbilitySpecHandle AbilityToActivate,
int16 PredictionKey )

◆ ClientCancelAbility()

void ClientCancelAbility ( FGameplayAbilitySpecHandle AbilityToCancel,
FGameplayAbilityActivationInfo ActivationInfo )

◆ ClientEndAbility()

void ClientEndAbility ( FGameplayAbilitySpecHandle AbilityToEnd,
FGameplayAbilityActivationInfo ActivationInfo )

◆ ClientPrintDebug_Response()

void ClientPrintDebug_Response ( TArray< FString > Strings,
int GameFlags )

◆ ClientTryActivateAbility()

void ClientTryActivateAbility ( FGameplayAbilitySpecHandle AbilityToActivate)

◆ Create()

UAbilitySystemComponent Create ( AActor Actor,
FName WithName = NAME_None )
static

◆ ExecuteGameplayCueWithEffectContext()

void ExecuteGameplayCueWithEffectContext ( const FGameplayTag GameplayCueTag,
FGameplayEffectContextHandle EffectContext )

◆ ExecuteGameplayCueWithParameters()

void ExecuteGameplayCueWithParameters ( const FGameplayTag GameplayCueTag,
FGameplayCueParameters GameplayCueParameters )

◆ FindAbilitySpecFromClass()

bool FindAbilitySpecFromClass ( const TSubclassOf< UGameplayAbility > InAbilityClass,
FGameplayAbilitySpec & OutSpec )

◆ FindAbilitySpecFromGEHandle()

bool FindAbilitySpecFromGEHandle ( const FActiveGameplayEffectHandle Handle,
FGameplayAbilitySpec & OutSpec )

◆ FindAbilitySpecFromHandle()

bool FindAbilitySpecFromHandle ( const FGameplayAbilitySpecHandle Handle,
FGameplayAbilitySpec & OutSpec )

◆ FindAbilitySpecFromInputID()

bool FindAbilitySpecFromInputID ( int InputID,
FGameplayAbilitySpec & OutSpec )

◆ FindAllAbilitiesMatchingQuery()

void FindAllAbilitiesMatchingQuery ( TArray< FGameplayAbilitySpecHandle > & OutAbilityHandles,
FGameplayTagQuery Query ) const

Returns an array with all abilities that match the provided Gameplay Tag Query.

Parameters
OutAbilityHandlesThis array will be filled with matching Ability Spec Handles
QueryGameplay Tag Query to match

◆ FindAllAbilitiesWithInputID()

void FindAllAbilitiesWithInputID ( TArray< FGameplayAbilitySpecHandle > & OutAbilityHandles,
int InputID = 0 ) const

Returns an array with all abilities bound to an Input ID value.

Parameters
OutAbilityHandlesThis array will be filled with matching Ability Spec Handles
InputIDThe Input ID to match

◆ FindAllAbilitiesWithTags()

void FindAllAbilitiesWithTags ( TArray< FGameplayAbilitySpecHandle > & OutAbilityHandles,
FGameplayTagContainer Tags,
bool bExactMatch = true ) const

Returns an array with all abilities that match the provided tags.

Parameters
OutAbilityHandlesThis array will be filled with matching Ability Spec Handles
TagsGameplay Tags to match
bExactMatchIf true, tags must be matched exactly. Otherwise, abilities matching any of the tags will be returned

◆ FindMatchingOwnedTag()

FGameplayTag FindMatchingOwnedTag ( FGameplayTag Tag) const

Given a tag, returns the first matching owned tag that is actually on the component.

For example, if given State, this would return all the State.Grounded, State.Combat, etc.

◆ FindMatchingOwnedTags()

FGameplayTagContainer FindMatchingOwnedTags ( FGameplayTag Tag) const

Given a tag, returns all matching owned tags that are actually on the component.

For example, if given State, this would return all the State.Grounded, State.Combat, etc.

◆ Get()

UAbilitySystemComponent Get ( const AActor Actor,
FName WithName = NAME_None )
static

◆ GetActiveEffects()

TArray< FActiveGameplayEffectHandle > GetActiveEffects ( FGameplayEffectQuery Query) const

Returns list of active effects, for a query.

◆ GetActiveEffectsWithAllTags()

TArray< FActiveGameplayEffectHandle > GetActiveEffectsWithAllTags ( FGameplayTagContainer Tags) const

Returns list of active effects that have all of the passed in tags.

◆ GetAllAbilities()

void GetAllAbilities ( TArray< FGameplayAbilitySpecHandle > & OutAbilityHandles) const

Returns an array with all granted ability handles NOTE: currently this doesn't include abilities that are mid-activation.

Parameters
OutAbilityHandlesThis array will be filled with the granted Ability Spec Handles

◆ GetAllAttributes()

void GetAllAttributes ( TArray< FGameplayAttribute > & OutAttributes)

Returns a list of all attributes for this abilty system component.

◆ GetAttributeSet()

const UAttributeSet GetAttributeSet ( TSubclassOf< UAttributeSet > AttributeSetClass) const

Returns a reference to the Attribute Set instance, if one exists in this component.

Parameters
AttributeSetClassThe type of attribute set to look for

◆ GetGameplayAttributeValue()

float32 GetGameplayAttributeValue ( FGameplayAttribute Attribute,
bool & bFound ) const

Returns the current value of the given gameplay attribute, or zero if the attribute is not found. NOTE: This doesn't take predicted gameplay effect modifiers into consideration, so the value may not be accurate on clients at all times.

Parameters
AttributeThe gameplay attribute to query
bFoundSet to true if the attribute exists in this component

◆ GetGameplayEffectCount()

int GetGameplayEffectCount ( TSubclassOf< UGameplayEffect > SourceGameplayEffect,
UAbilitySystemComponent OptionalInstigatorFilterComponent,
bool bEnforceOnGoingCheck = true ) const

Get the count of the specified source effect on the ability system component. For non-stacking effects, this is the sum of all active instances. For stacking effects, this is the sum of all valid stack counts. If an instigator is specified, only effects from that instigator are counted.

Parameters
SourceGameplayEffectEffect to get the count of
OptionalInstigatorFilterComponentIf specified, only count effects applied by this ability system component
Returns
Count of the specified source effect

◆ GetGameplayEffectCount_IfLoaded()

int GetGameplayEffectCount_IfLoaded ( TSoftClassPtr< UGameplayEffect > SoftSourceGameplayEffect,
UAbilitySystemComponent OptionalInstigatorFilterComponent,
bool bEnforceOnGoingCheck = true ) const

Get the count of the specified source effect on the ability system component. For non-stacking effects, this is the sum of all active instances. For stacking effects, this is the sum of all valid stack counts. If an instigator is specified, only effects from that instigator are counted.

Parameters
SoftSourceGameplayEffectEffect to get the count of. If this is not currently loaded, the count is 0
OptionalInstigatorFilterComponentIf specified, only count effects applied by this ability system component
Returns
Count of the specified source effect

◆ GetGameplayEffectMagnitude()

float32 GetGameplayEffectMagnitude ( FActiveGameplayEffectHandle Handle,
FGameplayAttribute Attribute ) const

Raw accessor to ask the magnitude of a gameplay effect, not necessarily always correct. How should outside code (UI, etc) ask things like 'how much is this gameplay effect modifying my damage by' (most likely we want to catch this on the backend - when damage is applied we can get a full dump/history of how the number got to where it is. But still we may need polling methods like below (how much would my damage be).

◆ GetGameplayTagCount()

int GetGameplayTagCount ( FGameplayTag GameplayTag) const

Returns the current count of the given gameplay tag. This includes both loose tags, and tags granted by gameplay effects and abilities. This function can be called on the client, but it may not display the most current count on the server.

Parameters
GameplayTagThe gameplay tag to query

◆ GetOrCreate()

UAbilitySystemComponent GetOrCreate ( AActor Actor,
FName WithName = NAME_None )
static

◆ GetOwnedGameplayTags()

void GetOwnedGameplayTags ( FGameplayTagContainer & TagContainer) const

◆ GetSpawnedAttributes()

const TArray< UAttributeSet > & GetSpawnedAttributes ( ) const

◆ GetUserAbilityActivationInhibited()

bool GetUserAbilityActivationInhibited ( ) const

This is meant to be used to inhibit activating an ability from an input perspective. (E.g., the menu is pulled up, another game mechanism is consuming all input, etc) This should only be called on locally owned players. This should not be used to game mechanics like silences or disables. Those should be done through gameplay effects.

◆ GiveAbility() [1/2]

◆ GiveAbility() [2/2]

FGameplayAbilitySpecHandle GiveAbility ( TSubclassOf< UGameplayAbility > AbilityClass,
int Level = 0,
int InputID = - 1 )

Grants a Gameplay Ability and returns its handle. This will be ignored if the actor is not authoritative.

Parameters
AbilityClassType of ability to grant
LevelLevel to grant the ability at
InputIDInput ID value to bind ability activation to.

◆ GiveAbilityAndActivateOnce() [1/2]

FGameplayAbilitySpecHandle GiveAbilityAndActivateOnce ( FGameplayAbilitySpec & Spec)

◆ GiveAbilityAndActivateOnce() [2/2]

FGameplayAbilitySpecHandle GiveAbilityAndActivateOnce ( TSubclassOf< UGameplayAbility > AbilityClass,
int Level = 0,
int InputID = - 1 )

Grants a Gameplay Ability, activates it once, and removes it. This will be ignored if the actor is not authoritative.

Parameters
AbilityClassType of ability to grant
LevelLevel to grant the ability at
InputIDInput ID value to bind ability activation to.

◆ GiveAbilityAndActivateOnceWithEventData()

FGameplayAbilitySpecHandle GiveAbilityAndActivateOnceWithEventData ( FGameplayAbilitySpec & Spec,
FGameplayEventData EventData )

◆ InitDefaultGameplayCueParameters()

void InitDefaultGameplayCueParameters ( FGameplayCueParameters & Parameters)

◆ InitStats()

void InitStats ( TSubclassOf< UAttributeSet > Attributes,
const UDataTable DataTable )

◆ InputCancel()

void InputCancel ( )

Sends a local player Input Cancel event, notifying abilities.

◆ InputConfirm()

void InputConfirm ( )

Sends a local player Input Confirm event, notifying abilities.

◆ IsGameplayCueActive()

bool IsGameplayCueActive ( const FGameplayTag GameplayCueTag) const

Allows polling to see if a GameplayCue is active. We expect most GameplayCue handling to be event based, but some cases we may need to check if a GameplayCue is active (Animation Blueprint for example).

◆ MakeEffectContext()

FGameplayEffectContextHandle MakeEffectContext ( ) const

Create an EffectContext for the owner of this AbilitySystemComponent.

◆ MakeOutgoingSpec()

FGameplayEffectSpecHandle MakeOutgoingSpec ( TSubclassOf< UGameplayEffect > GameplayEffectClass,
float32 Level,
FGameplayEffectContextHandle Context ) const

Get an outgoing GameplayEffectSpec that is ready to be applied to other things.

◆ MarkAbilitySpecDirty()

void MarkAbilitySpecDirty ( FGameplayAbilitySpec & Spec,
bool bWasAddOrRemove = false )

◆ PressInputID()

void PressInputID ( int InputID)

Sends a local player Input Pressed event with the provided Input ID, notifying any bound abilities.

Parameters
InputIDThe Input ID to match

◆ ReleaseInputID()

void ReleaseInputID ( int InputID)

Sends a local player Input Released event with the provided Input ID, notifying any bound abilities.

Parameters
InputIDThe Input ID to match

◆ RemoveActiveEffectsWithAppliedTags()

int RemoveActiveEffectsWithAppliedTags ( FGameplayTagContainer Tags)

Removes all active effects that apply any of the tags in Tags.

◆ RemoveActiveEffectsWithGrantedTags()

int RemoveActiveEffectsWithGrantedTags ( FGameplayTagContainer Tags)

Removes all active effects that grant any of the tags in Tags.

◆ RemoveActiveEffectsWithSourceTags()

int RemoveActiveEffectsWithSourceTags ( FGameplayTagContainer Tags)

Removes all active effects with captured source tags that contain any of the tags in Tags.

◆ RemoveActiveEffectsWithTags()

int RemoveActiveEffectsWithTags ( FGameplayTagContainer Tags)

Removes all active effects that contain any of the tags in Tags.

◆ RemoveActiveGameplayEffect()

bool RemoveActiveGameplayEffect ( FActiveGameplayEffectHandle Handle,
int StacksToRemove = - 1 )

Removes GameplayEffect by Handle. StacksToRemove=-1 will remove all stacks.

◆ RemoveActiveGameplayEffectBySourceEffect()

void RemoveActiveGameplayEffectBySourceEffect ( TSubclassOf< UGameplayEffect > GameplayEffect,
UAbilitySystemComponent InstigatorAbilitySystemComponent,
int StacksToRemove = - 1 )

Remove active gameplay effects whose backing definition are the specified gameplay effect class.

Parameters
GameplayEffectClass of gameplay effect to remove; Does nothing if left null
InstigatorAbilitySystemComponentIf specified, will only remove gameplay effects applied from this instigator ability system component
StacksToRemoveNumber of stacks to remove, -1 means remove all

◆ RemoveAllGameplayCues()

void RemoveAllGameplayCues ( )

◆ RemoveAllSpawnedAttributes()

void RemoveAllSpawnedAttributes ( )

◆ RemoveGameplayCue()

void RemoveGameplayCue ( const FGameplayTag GameplayCueTag)

◆ RemoveLooseGameplayTag()

void RemoveLooseGameplayTag ( FGameplayTag GameplayTag,
int Count = 1 )

◆ RemoveLooseGameplayTags()

void RemoveLooseGameplayTags ( FGameplayTagContainer GameplayTags,
int Count = 1 )

◆ RemoveReplicatedLooseGameplayTag()

void RemoveReplicatedLooseGameplayTag ( FGameplayTag GameplayTag)

◆ RemoveReplicatedLooseGameplayTags()

void RemoveReplicatedLooseGameplayTags ( FGameplayTagContainer GameplayTags)

◆ RemoveSpawnedAttribute()

void RemoveSpawnedAttribute ( UAttributeSet Attribute)

◆ SendGameplayEvent()

void SendGameplayEvent ( const FGameplayTag EventTag,
FGameplayEventData Payload )

◆ ServerCancelAbility()

void ServerCancelAbility ( FGameplayAbilitySpecHandle AbilityToCancel,
FGameplayAbilityActivationInfo ActivationInfo )

◆ ServerCurrentMontageJumpToSectionName()

void ServerCurrentMontageJumpToSectionName ( UAnimSequenceBase ClientAnimation,
FName SectionName )

RPC function called from CurrentMontageJumpToSection, replicates to other clients.

◆ ServerCurrentMontageSetNextSectionName()

void ServerCurrentMontageSetNextSectionName ( UAnimSequenceBase ClientAnimation,
float32 ClientPosition,
FName SectionName,
FName NextSectionName )

RPC function called from CurrentMontageSetNextSectionName, replicates to other clients.

◆ ServerCurrentMontageSetPlayRate()

void ServerCurrentMontageSetPlayRate ( UAnimSequenceBase ClientAnimation,
float32 InPlayRate )

RPC function called from CurrentMontageSetPlayRate, replicates to other clients.

◆ ServerPrintDebug_Request()

void ServerPrintDebug_Request ( )

Ask the server to send ability system debug information back to the client, via ClientPrintDebug_Response.

◆ ServerPrintDebug_RequestWithStrings()

void ServerPrintDebug_RequestWithStrings ( TArray< FString > Strings)

Same as ServerPrintDebug_Request but this includes the client debug strings so that the server can embed them in replays.

◆ ServerSetInputPressed()

void ServerSetInputPressed ( FGameplayAbilitySpecHandle AbilityHandle)

Direct Input state replication. These will be called if bReplicateInputDirectly is true on the ability and is generally not a good thing to use. (Instead, prefer to use Generic Replicated Events).

◆ ServerSetInputReleased()

void ServerSetInputReleased ( FGameplayAbilitySpecHandle AbilityHandle)

◆ SetActiveGameplayEffectLevel()

void SetActiveGameplayEffectLevel ( FActiveGameplayEffectHandle ActiveHandle,
int NewLevel )

Updates the level of an already applied gameplay effect. The intention is that this is 'seemless' and doesnt behave like removing/reapplying.

◆ SetActiveGameplayEffectLevelUsingQuery()

void SetActiveGameplayEffectLevelUsingQuery ( FGameplayEffectQuery Query,
int NewLevel )

Updates the level of an already applied gameplay effect. The intention is that this is 'seemless' and doesnt behave like removing/reapplying.

◆ SetLooseGameplayTagCount()

void SetLooseGameplayTagCount ( FGameplayTag GameplayTag,
int NewCount )

◆ SetReplicatedLooseGameplayTagCount()

void SetReplicatedLooseGameplayTagCount ( FGameplayTag GameplayTag,
int NewCount )

◆ SetUserAbilityActivationInhibited()

void SetUserAbilityActivationInhibited ( bool NewInhibit)

Disable or Enable a local user from being able to activate abilities. This should only be used for input/UI etc related inhibition. Do not use for game mechanics.

◆ StaticClass()

UClass StaticClass ( )
static

◆ TargetCancel()

void TargetCancel ( )

Any active targeting actors will be stopped and canceled, not returning any targeting data.

◆ TargetConfirm()

void TargetConfirm ( )

Any active targeting actors will be told to stop and return current targeting data.

◆ TryActivateAbilitiesByTag()

bool TryActivateAbilitiesByTag ( FGameplayTagContainer GameplayTagContainer,
bool bAllowRemoteActivation = true )

Attempts to activate every gameplay ability that matches the given tag and DoesAbilitySatisfyTagRequirements(). Returns true if anything attempts to activate. Can activate more than one ability and the ability may fail later. If bAllowRemoteActivation is true, it will remotely activate local/server abilities, if false it will only try to locally activate abilities.

◆ TryActivateAbility()

bool TryActivateAbility ( FGameplayAbilitySpecHandle AbilityToActivate,
bool bAllowRemoteActivation = true )

Attempts to activate the given ability, will check costs and requirements before doing so. Returns true if it thinks it activated, but it may return false positives due to failure later in activation. If bAllowRemoteActivation is true, it will remotely activate local/server abilities, if false it will only try to locally activate the ability.

◆ TryActivateAbilityByClass()

bool TryActivateAbilityByClass ( TSubclassOf< UGameplayAbility > InAbilityToActivate,
bool bAllowRemoteActivation = true )

Attempts to activate the ability that is passed in. This will check costs and requirements before doing so. Returns true if it thinks it activated, but it may return false positives due to failure later in activation. If bAllowRemoteActivation is true, it will remotely activate local/server abilities, if false it will only try to locally activate the ability.

◆ UpdateActiveGameplayEffectSetByCallerMagnitude()

void UpdateActiveGameplayEffectSetByCallerMagnitude ( FActiveGameplayEffectHandle ActiveHandle,
FGameplayTag SetByCallerTag,
float32 NewValue )

Dynamically update the set-by-caller magnitude for an active gameplay effect.

◆ UpdateActiveGameplayEffectSetByCallerMagnitudes()

void UpdateActiveGameplayEffectSetByCallerMagnitudes ( FActiveGameplayEffectHandle ActiveHandle,
TMap< FGameplayTag, float32 > NewSetByCallerValues )

Dynamically update multiple set-by-caller magnitudes for an active gameplay effect.

Member Data Documentation

◆ ActivatableAbilities

FGameplayAbilitySpecContainer ActivatableAbilities

The abilities we can activate. -This will include CDOs for non instanced abilities and per-execution instanced abilities. -Actor-instanced abilities will be the actual instance (not CDO).

This array is not vital for things to work. It is a convenience thing for 'giving abilities to the actor'. But abilities could also work on things without an AbilitySystemComponent. For example an ability could be written to execute on a StaticMeshActor. As long as the ability doesn't require instancing or anything else that the AbilitySystemComponent would provide, then it doesn't need the component to function.

◆ AffectedAnimInstanceTag

FName AffectedAnimInstanceTag

The linked Anim Instance that this component will play montages in. Use NAME_None for the main anim instance.

◆ DefaultStartingData

TArray<FAttributeDefaults> DefaultStartingData

◆ SpawnedAttributes

const TArray<UAttributeSet> SpawnedAttributes

List of attribute sets.

◆ UserAbilityActivationInhibited

bool UserAbilityActivationInhibited

Rather activation is currently inhibited.