Navigation
API > API/Plugins > API/Plugins/GameplayAbilities > API/Plugins/GameplayAbilities/Abilities > API/Plugins/GameplayAbilities/Abilities/Tasks
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UGameplayTask
- UAbilityTask
- UAbilityTask_StartAbilityState
References
| Module | GameplayAbilities |
| Header | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/Abilities/Tasks/AbilityTask_StartAbilityState.h |
| Include | #include "Abilities/Tasks/AbilityTask_StartAbilityState.h" |
Syntax
UCLASS&40;&41;
class UAbilityTask_StartAbilityState : public UAbilityTask
Remarks
An ability state is simply an ability task that provides a way to handle the ability being interrupted. You can use ability states to do state-specific cleanup if the ability ends or was interrupted at a certain point during it's execution.
An ability state will always result in either 'OnStateEnded' or 'OnStateInterrupted' being called.
'OnStateEnded' will be called if:
- The ability itself ends via AGameplayAbility::EndAbility
- The ability state is manually ended via AGameplayAbility::EndAbilityState
- Another ability state is started will 'bEndCurrentState' set to true
'OnStateInterrupted' will be called if:
- The ability itself is cancelled via AGameplayAbility::CancelAbility
Variables
| Type | Name | Description | |
|---|---|---|---|
| FAbilityStateDelegate | OnStateEnded | Invoked if 'EndAbilityState' is called or if 'EndAbility' is called and this state is active. | |
| FAbilityStateDelegate | OnStateInterrupted | Invoked if the ability was interrupted and this state is active. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UAbilityTask_StartAbilityState
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| UAbilityTask_StartAbilityState * | StartAbilityState
(
UGameplayAbility* OwningAbility, |
Starts a new ability state. |