UBTTask_PlayAnimation

Play indicated AnimationAsset on Pawn controlled by BT

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

AIModule

Header

/Engine/Source/Runtime/AIModule/Classes/BehaviorTree/Tasks/BTTask_PlayAnimation.h

Include

#include "BehaviorTree/Tasks/BTTask_PlayAnimation.h"

Syntax

class UBTTask_PlayAnimation : public UBTTaskNode

Remarks

Play indicated AnimationAsset on Pawn controlled by BT

that this node is generic and is handing multiple special cases, If you want a more efficient solution you'll need to implement it yourself (or wait for our BTTask_PlayCharacterAnimation)

Variables

Name Description

Public variable

UAnimationAsset...

 

AnimationToPlay

Animation asset to play.

that it needs to match the skeleton of pawn this BT is controlling

Public variable

uint32: 1

 

bLooping

Public variable

uint32: 1

 

bNonBlocking

If true the task will just trigger the animation and instantly finish. Fire and Forget.

Public variable

USkeletalMeshCo...

 

CachedSkelMesh

Public variable

UBehaviorTreeCo...

 

MyOwnerComp

Public variable

EAnimationMode:...

 

PreviousAnimationMode

Public variable

FTimerDelegate

 

TimerDelegate

Public variable

FTimerHandle

 

TimerHandle

Constructors

Name Description

Public function

UBTTask_PlayAnimation

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Protected function

void

 

CleanUp

(
    UBehaviorTreeComponent& OwnerComp
)

Public function

void

 

OnAnimationTimerDone()

Overridden from UBTTaskNode

Name Description

Public function Virtual

EBTNodeResul...

 

AbortTask

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory
)

Aborts this task, should return Aborted or InProgress (use FinishLatentAbort() when returning InProgress) this function should be considered as const (don't modify state of object) if node is not instanced!

Public function Virtual

EBTNodeResul...

 

ExecuteTask

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory
)

Starts this task, should return Succeeded, Failed or InProgress (use FinishLatentTask() when returning InProgress) this function should be considered as const (don't modify state of object) if node is not instanced!

Overridden from UBTNode

Name Description

Public function Virtual Const

FName

 

GetNodeIconName()

Get the name of the icon used to display this node in the editor

Public function Virtual Const

FString

 

GetStaticDescription()

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss