UBTTask_GameplayTaskBase

Base class for managing gameplay tasks Since AITask doesn't have any kind of success/failed results, default implemenation will only return EBTNode::Succeeded

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

AIModule

Header

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

Include

#include "BehaviorTree/Tasks/BTTask_GameplayTaskBase.h"

Syntax

class UBTTask_GameplayTaskBase : public UBTTaskNode

Remarks

Base class for managing gameplay tasks Since AITask doesn't have any kind of success/failed results, default implemenation will only return EBTNode::Succeeded

In your ExecuteTask:

Variables

Name Description

Protected variable

uint32: 1

 

bWaitForGameplayTask

If set, behavior tree task will wait until gameplay tasks finishes

Constructors

Name Description

Public function

UBTTask_GameplayTaskBase

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Protected function Virtual Const

EBTNodeResul...

 

DetermineGameplayTaskResult

(
    UAITask& Task
)

Get finish result from task

Protected function

EBTNodeResul...

 

StartGameplayTask

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory,
    UAITask& Task
)

Start task and initialize FBTGameplayTaskMemory memory block

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

void

 

OnTaskFinished

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory,
    EBTNodeResult::Type TaskResult
)

Called when task execution is finished 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

uint16

 

GetInstanceMemorySize()

Size of instance memory

Overridden from IGameplayTaskOwnerInterface

Name Description

Public function Virtual

void

 

OnGameplayTaskDeactivated

(
    UGameplayTask& Task
)

Notify called after GameplayTask changes state from Active (finishing or pausing)

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