UAbilityTask_PlayMontageAndWait

Ability task to simply play a montage.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

GameplayAbilities

Header

/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/Abilities/Tasks/AbilityTask_PlayMontageAndWait.h

Include

#include "Abilities/Tasks/AbilityTask_PlayMontageAndWait.h"

Syntax

UCLASS()
class UAbilityTask_PlayMontageAndWait : public UAbilityTask

Remarks

Ability task to simply play a montage. Many games will want to make a modified version of this task that looks for game-specific events

Variables

Name Description

Protected variable UProperty

float

 

AnimRootMotionTranslationScale

Protected variable

FOnMontageBlend...

 

BlendingOutDelegate

Public variable

 

BlueprintInternalUseOnly

Protected variable UProperty

bool

 

bStopWhenAbilityEnds

Public variable

 

DefaultToSelf

Public variable

 

HidePin

Start playing an animation montage on the avatar actor and wait for it to finish If StopWhenAbilityEnds is true, this montage will be aborted if the ability ends normally.

Protected variable

FDelegateHandle

 

InterruptedHandle

Protected variable

FOnMontageEnded

 

MontageEndedDelegate

Protected variable UProperty

UAnimMontage &#...

 

MontageToPlay

Public variable UProperty BlueprintAssignable

FMontageWaitSim...

 

OnBlendOut

Public variable UProperty BlueprintAssignable

FMontageWaitSim...

 

OnCancelled

Public variable UProperty BlueprintAssignable

FMontageWaitSim...

 

OnCompleted

Public variable UProperty BlueprintAssignable

FMontageWaitSim...

 

OnInterrupted

Protected variable UProperty

float

 

Rate

Protected variable UProperty

FName

 

StartSection

Protected variable UProperty

float

 

StartTimeSeconds

Constructors

Name Description

Public function

UAbilityTask_PlayMontageAndWait

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function UFunction

void

 

OnMontageBlendingOut

(
    UAnimMontage* Montage,
    bool bInterrupted
)

Public function UFunction

void

 

OnMontageEnded

(
    UAnimMontage* Montage,
    bool bInterrupted
)

Public function UFunction

void

 

OnMontageInterrupted()

Protected function

bool

 

StopPlayingMontage()

Checks if the ability is playing a montage and stops that montage, returns true if a montage was stopped, false if not.

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 ability is asked to cancel from an outside node.

Public function Virtual Const

FString

 

GetDebugString()

Return debug string describing task

Protected function Virtual

void

 

OnDestroy

(
    bool bInOwnerFinished
)

End and CleanUp the task - may be called by the task itself or by the task owner if the owner is ending.