UBTTask_BlueprintBase

Base class for blueprint based task nodes.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

AIModule

Header

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

Include

#include "BehaviorTree/Tasks/BTTask_BlueprintBase.h"

Syntax

class UBTTask_BlueprintBase : public UBTTaskNode

Remarks

Base class for blueprint based task nodes. Do NOT use it for creating native c++ classes!

When task receives Abort event, all latent actions associated this instance are being removed. This prevents from resuming activity started by Execute, but does not handle external events. Please use them safely (unregister at abort) and call IsTaskExecuting() when in doubt.

Variables

Name Description

Protected variable

AActor *

 

ActorOwner

Cached actor owner of BehaviorTreeComponent.

Protected variable

AAIController &...

 

AIOwner

Cached AIController owner of BehaviorTreeComponent.

Protected variable

uint32: 1

 

bIsAborting

Set when task enters Aborting state

Protected variable

uint32: 1

 

bShowPropertyDetails

Show detailed information about properties

Protected variable

uint32: 1

 

bStoreFinishResult

If set, execution is inside blueprint's ReceiveExecute(Abort) event FinishExecute(Abort) function should store their result in CurrentCallResult variable

Protected variable

TEnumAsByte< EB...

 

CurrentCallResult

Temporary variable for ReceiveExecute(Abort)-FinishExecute(Abort) chain

Protected variable

FString

 

CustomDescription

Protected variable

TArray< FProper...

 

PropertyData

Properties that should be copied

Protected variable

uint32: 2

 

ReceiveAbortImplementations

Set if ReceiveAbort is implemented by blueprint

Protected variable

uint32: 2

 

ReceiveExecuteImplementations

Set if ReceiveExecute is implemented by blueprint

Protected variable

uint32: 2

 

ReceiveTickImplementations

Set if ReceiveTick is implemented by blueprint

Protected variable

FIntervalCountd...

 

TickInterval

If any of the Tick functions is implemented, how ofter should they be ticked.

Constructors

Name Description

Public function

UBTTask_BlueprintBase

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Protected function

void

 

FinishAbort()

Aborts task execution

Protected function

void

 

FinishExecute

(
    bool bSuccess
)

Finishes task execution with Success or Fail result

Protected function Const

bool

 

IsTaskAborting()

Check if task is currently being aborted

Protected function Const

bool

 

IsTaskExecuting()

Check if task is currently being executed

Protected function

void

 

ReceiveAbort

(
    AActor* OwnerActor
)

If blueprint graph contains this event, task will stay active until FinishAbort is called that if both generic and AI event versions are implemented only the more suitable one will be called, meaning the AI version if called for AI, generic one otherwise

Protected function

void

 

ReceiveAbortAI

(
    AAIController* OwnerController,
    APawn* ControlledPawn
)

Alternative AI version of ReceiveAbort

Protected function

void

 

ReceiveExecute

(
    AActor* OwnerActor
)

Entry point, task will stay active until FinishExecute is called.

Protected function

void

 

ReceiveExecuteAI

(
    AAIController* OwnerController,
    APawn* ControlledPawn
)

Alternative AI version of ReceiveExecute

Protected function

void

 

ReceiveTick

(
    AActor* OwnerActor,
    float DeltaSeconds
)

Tick function that if both generic and AI event versions are implemented only the more suitable one will be called, meaning the AI version if called for AI, generic one otherwise

Protected function

void

 

ReceiveTickAI

(
    AAIController* OwnerController,
    APawn* ControlledPawn,
    float DeltaSeconds
)

Alternative AI version of tick function.

Protected function

void

 

SetFinishOnMessage

(
    FName MessageName
)

Task execution will be finished (with result 'Success') after receiving specified message

Protected function

void

 

SetFinishOnMessageWithId

(
    FName MessageName,
    int32 RequestID
)

Task execution will be finished (with result 'Success') after receiving specified message with indicated ID

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!

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!

Protected function Virtual

void

 

TickTask

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory,
    float DeltaSeconds
)

Ticks this task

Overridden from UBTNode

Name Description

Public function Virtual Const

void

 

DescribeRuntimeValues

(
    const UBehaviorTreeComponent& Owne...,
    uint8* NodeMemory,
    EBTDescriptionVerbosity::Type Verbo...,
    TArray< FString >& Values
)

Gathers description of all runtime parameters

Public function Virtual Const

FString

 

GetStaticDescription()

Public function Virtual

void

 

InitializeFromAsset

(
    UBehaviorTree& Asset
)

Initialize any asset related data

Public function Virtual

void

 

OnInstanceDestroyed

(
    UBehaviorTreeComponent& OwnerComp
)

Called when node instance is removed from tree

Public function Virtual

void

 

SetOwner

(
    AActor* ActorOwner
)

Gets called only for instanced nodes(bCreateNodeInstance == true).

Public function Virtual Const

bool

 

UsesBlueprint()

Get whether this node is using a blueprint for its logic

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