UAbilityTask_StartAbilityState

An ability state is simply an ability task that provides a way to handle the ability being interrupted.

Windows
MacOS
Linux

Inheritance Hierarchy

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](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)()
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

Name Description

Public variable UProperty BlueprintAssignable

FAbilityStateDe ...

 

OnStateEnded

Invoked if 'EndAbilityState' is called or if 'EndAbility' is called and this state is active.

Public variable UProperty BlueprintAssignable

FAbilityStateDe ...

 

OnStateInterrupted

Invoked if the ability was interrupted and this state is active.

Constructors

Name Description

Public function

UAbilityTask_StartAbilityState

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Public function Static UFunction BlueprintCallable, Category, Meta

UAbilityTask ...

 

StartAbilityState

(
    UGameplayAbility * OwningAbilit...,
    FName StateName,
    bool bEndCurrentState
)

Starts a new ability state.

Overridden from UGameplayTask

Name Description

Public function Virtual

void

 

Activate()

Called to trigger the actual task once the delegates have been set up Note that the default implementation does nothing and you don't have to call it

Public function Virtual

void

 

ExternalCancel()

Called when the task is asked to cancel from an outside node.

Public function Virtual Const

FString

 

GetDebugString()

Return debug string describing task

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback