Interface IGameplayAbilitySystem
The IGameplayAbilitySystem is the primary component of the Gameplay Ability System. Every component that needs to participate with the Ability System (such as receiving or dealing damage) needs to have this component.
Namespace: GameplayAbilitySystem.Interfaces
Assembly: Assembly-CSharp-firstpass.dll
Syntax
public interface IGameplayAbilitySystem
Properties
| Improve this Doc View SourceActiveGameplayEffects
Lists all active GameplayEffect on this IGameplayAbilitySystem
Declaration
List<ActiveGameplayEffectData> ActiveGameplayEffects { get; }
Property Value
| Type | Description |
|---|---|
| List<ActiveGameplayEffectData> |
OnGameplayAbilityActivated
Called when a IGameplayAbility is activated on this IGameplayAbilitySystem. Activation may or may not result in the ability actually running.
Declaration
GenericAbilityEvent OnGameplayAbilityActivated { get; }
Property Value
| Type | Description |
|---|---|
| GenericAbilityEvent |
OnGameplayAbilityCommitted
Called when a IGameplayAbility is committed on this IGameplayAbilitySystem. This indicates that the resource/cooldown for the ability have been commited and the ability will be executed
Declaration
GenericAbilityEvent OnGameplayAbilityCommitted { get; }
Property Value
| Type | Description |
|---|---|
| GenericAbilityEvent |
OnGameplayAbilityEnded
Called when a IGameplayAbility ends IGameplayAbilitySystem (e.g. EndAbility(IGameplayAbilitySystem) is called) This indicates that the resource/cooldown for the ability have been commited and the ability will be executed
Declaration
GenericAbilityEvent OnGameplayAbilityEnded { get; }
Property Value
| Type | Description |
|---|---|
| GenericAbilityEvent |
OnGameplayEvent
This event is called when a GameplayEvent is executed this IGameplayAbilitySystem
Declaration
GameplayEvent OnGameplayEvent { get; }
Property Value
| Type | Description |
|---|---|
| GameplayEvent |
RunningAbilities
List of running abilities that have not ended on this IGameplayAbilitySystem
Declaration
List<IGameplayAbility> RunningAbilities { get; }
Property Value
| Type | Description |
|---|---|
| List<IGameplayAbility> |
Methods
| Improve this Doc View SourceAddGameplayEffectToActiveList(GameplayEffect)
Applies a GameplayEffect to this IGameplayAbilitySystem
Declaration
void AddGameplayEffectToActiveList(GameplayEffect Effect)
Parameters
| Type | Name | Description |
|---|---|---|
| GameplayEffect | Effect | Effect to be applied |
ApplyGameEffectToTarget(GameplayEffect, IGameplayAbilitySystem, Single)
Applies a GameplayEffect to the target IGameplayAbilitySystem. The overall effect may be modulated by the Level.
Declaration
GameplayEffect ApplyGameEffectToTarget(GameplayEffect Effect, IGameplayAbilitySystem Target, float Level = 0F)
Parameters
| Type | Name | Description |
|---|---|---|
| GameplayEffect | Effect | Effect to be applied |
| IGameplayAbilitySystem | Target | Target on which effect is to be applied |
| System.Single | Level | Level of the effect. May be used to affect the "strength" of the effect |
Returns
| Type | Description |
|---|---|
| GameplayEffect | GameplayEffect that was applied to the target |
CanActivateAbility(GameplayAbility)
Checks to see if the GameplayAbility can be activated on this component. Does not execute the ability.
Declaration
bool CanActivateAbility(GameplayAbility Ability)
Parameters
| Type | Name | Description |
|---|---|---|
| GameplayAbility | Ability | The GameplayAbility to execute |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the ability can be activated, false otherwise |
GetActor()
Gets the parent
Declaration
Transform GetActor()
Returns
| Type | Description |
|---|---|
| Transform |
GetNumericAttribute(AttributeType)
Gets the numerical value of an attribute attached to this
Declaration
float GetNumericAttribute(AttributeType AttributeType)
Parameters
| Type | Name | Description |
|---|---|---|
| AttributeType | AttributeType | Type of attribute to get value of |
Returns
| Type | Description |
|---|---|
| System.Single | Current value of attribute |
HandleGameplayEvent(GameplayTag, GameplayEventData)
Responds to a Gameplay Event on this IGameplayAbilitySystem
Declaration
void HandleGameplayEvent(GameplayTag EventTag, GameplayEventData Payload)
Parameters
| Type | Name | Description |
|---|---|---|
| GameplayTag | EventTag | Tag of the event |
| GameplayEventData | Payload | Payload containing information about the event, such as target, etc. |
NotifyAbilityEnded(GameplayAbility)
Notifies this IGameplayAbilitySystem that the specified GameplayAbility has ended
Declaration
void NotifyAbilityEnded(GameplayAbility Ability)
Parameters
| Type | Name | Description |
|---|---|---|
| GameplayAbility | Ability | GameplayAbility which has ended |
TryActivateAbility(GameplayAbility)
Attempts to activate the GameplayAbility.
Declaration
bool TryActivateAbility(GameplayAbility Ability)
Parameters
| Type | Name | Description |
|---|---|---|
| GameplayAbility | Ability | The GameplayAbility to execute |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the ability was activated, false otherwise |