Language:
Discover
By Skill Level
By Category

UBTCompositeNode

Choose your OS:

Inheritance Hierarchy

Syntax

class UBTCompositeNode : public UBTNode

Variables

Name Description

Protected variable

uint32 : 1

 

bApplyDecoratorScope

If set, all decorators in branch below will be removed when execution flow leaves (decorators on this node are not affected)

Protected variable

uint32 : 1

 

bUseChildExecutionNotify

If set, NotifyChildExecution will be called

Protected variable

uint32 : 1

 

bUseDecoratorsActivationCheck

If set, CanNotifyDecoratorsOnActivation will be called

Protected variable

uint32 : 1

 

bUseDecoratorsDeactivationCheck

If set, CanNotifyDecoratorsOnDeactivation will be called

Protected variable

uint32 : 1

 

bUseDecoratorsFailedActivationCheck

If set, CanNotifyDecoratorsOnFailedActivation will be called

Protected variable

uint32 : 1

 

bUseNodeActivationNotify

If set, NotifyNodeActivation will be called

Protected variable

uint32 : 1

 

bUseNodeDeactivationNotify

If set, NotifyNodeDeactivation will be called

Public variable

TArray < FBTComp ...

 

Children

Child nodes

Protected variable

uint16

 

LastExecutionIndex

Execution index of last node in child branches

Public variable

FGetNextChildDe ...

 

OnNextChild

Delegate for finding next child to execute

Public variable

TArray < UBTServ ...

 

Services

Service nodes

Constructors

Name Description

Public function

UBTCompositeNode

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Public function Virtual

bool

 

CanAbortLowerPriority()

Allowed flow abort modes for decorators

Public function Virtual

bool

 

CanAbortSelf()

Protected function Virtual

bool

 

CanNotifyDecoratorsOnActivation

(
    FBehaviorTreeSearchData & SearchDat...,
    int32 ChildIdx
)

Check if NotifyDecoratorsOnActivation is allowed, requires bUseDecoratorsActivationCheck flag

Protected function Virtual

bool

 

CanNotifyDecoratorsOnDeactivation

(
    FBehaviorTreeSearchData & SearchDat...,
    int32 ChildIdx,
    EBTNodeResult::Type & NodeResult
)

Check if NotifyDecoratorsOnDeactivation is allowed, requires bUseDecoratorsDeactivationCheck flag

Protected function Virtual

bool

 

CanNotifyDecoratorsOnFailedActivation

(
    FBehaviorTreeSearchData & SearchDat...,
    int32 ChildIdx,
    EBTNodeResult::Type & NodeResult
)

Check if NotifyDecoratorsOnFailedActivation is allowed, requires bUseDecoratorsActivationCheck flag

Public function Virtual

bool

 

CanPushSubtree

(
    UBehaviorTreeComponent & OwnerComp,
    uint8 * NodeMemory,
    int32 ChildIdx
)

Check if child node can execute new subtree

Public function

void

 

ConditionalNotifyChildExecution

(
    UBehaviorTreeComponent & OwnerComp,
    uint8 * NodeMemory,
    const UBTNode & ChildNode,
    EBTNodeResult::Type & NodeResult
)

Notify about task execution start

Public function

bool

 

DoDecoratorsAllowExecution

(
    UBehaviorTreeComponent & OwnerComp,
    int32 InstanceIdx,
    int32 ChildIdx
)

Is child execution allowed by decorators?

Public function

int32

 

FindChildToExecute

(
    FBehaviorTreeSearchData & SearchDat...,
    EBTNodeResult::Type & LastResult
)

Find next child branch to execute

Public function

uint16

 

GetBranchExecutionIndex

(
    uint16 NodeInBranchIdx
)

Get first execution index of given branch

Public function

uint16

 

GetChildExecutionIndex

(
    int32 Index,
    EBTChildIndex ChildMode
)

Execution index of child node

Public function

int32

 

GetChildIndex

(
    FBehaviorTreeSearchData & SearchDat...,
    const UBTNode & ChildNode
)

Get index of child node (handle subtrees)

Public function

int32

 

GetChildIndex

(
    const UBTNode & ChildNode
)

Get index of child node

Public function

UBTNode *...

 

GetChildNode

(
    int32 Index
)

Inlines.

Public function

int32

 

GetChildrenNum()

Children count

Public function

uint16

 

GetLastExecutionIndex()

Execution index of last node in child branches

Public function

int32

 

GetMatchingChildIndex

(
    int32 ActiveInstanceIdx,
    FBTNodeIndex & NodeIdx
)

WITH_EDITOR.

Protected function

int32

 

GetNextChild

(
    FBehaviorTreeSearchData & SearchDat...,
    int32 LastChildIdx,
    EBTNodeResult::Type LastResult
)

Get next child to process and store it in CurrentChild

Public function

void

 

InitializeComposite

(
    uint16 InLastExecutionIndex
)

Fill in data about tree structure

Public function

bool

 

IsApplyingDecoratorScope()

Protected function Virtual

void

 

NotifyChildExecution

(
    UBehaviorTreeComponent & OwnerComp,
    uint8 * NodeMemory,
    int32 ChildIdx,
    EBTNodeResult::Type & NodeResult
)

Called just after child execution, allows to modify result

Protected function

void

 

NotifyDecoratorsOnActivation

(
    FBehaviorTreeSearchData & SearchDat...,
    int32 ChildIdx
)

Runs through decorators on given child node and notify them about activation

Protected function

void

 

NotifyDecoratorsOnDeactivation

(
    FBehaviorTreeSearchData & SearchDat...,
    int32 ChildIdx,
    EBTNodeResult::Type & NodeResult
)

Runs through decorators on given child node and notify them about deactivation

Protected function

void

 

NotifyDecoratorsOnFailedActivation

(
    FBehaviorTreeSearchData & SearchDat...,
    int32 ChildIdx,
    EBTNodeResult::Type & NodeResult
)

Runs through decorators on given child node and notify them about failed activation

Protected function Virtual

void

 

NotifyNodeActivation

(
    FBehaviorTreeSearchData & SearchDat...
)

Called when start enters this node

Protected function Virtual

void

 

NotifyNodeDeactivation

(
    FBehaviorTreeSearchData & SearchDat...,
    EBTNodeResult::Type & NodeResult
)

Called when start leaves this node

Public function

void

 

OnChildActivation

(
    FBehaviorTreeSearchData & SearchDat...,
    int32 ChildIndex
)

Public function

void

 

OnChildActivation

(
    FBehaviorTreeSearchData & SearchDat...,
    const UBTNode & ChildNode
)

Called before passing search to child node

Public function

void

 

OnChildDeactivation

(
    FBehaviorTreeSearchData & SearchDat...,
    const UBTNode & ChildNode,
    EBTNodeResult::Type & NodeResult
)

Called after child has finished search

Public function

void

 

OnChildDeactivation

(
    FBehaviorTreeSearchData & SearchDat...,
    int32 ChildIndex,
    EBTNodeResult::Type & NodeResult
)

Public function

void

 

OnNodeActivation

(
    FBehaviorTreeSearchData & SearchDat...
)

Called when start enters this node

Public function

void

 

OnNodeDeactivation

(
    FBehaviorTreeSearchData & SearchDat...,
    EBTNodeResult::Type & NodeResult
)

Called when search leaves this node

Public function

void

 

OnNodeRestart

(
    FBehaviorTreeSearchData & SearchDat...
)

Called when search needs to reactivate this node

Protected function

void

 

RequestDelayedExecution

(
    UBehaviorTreeComponent & OwnerComp,
    EBTNodeResult::Type LastResult
)

Store delayed execution request

Public function Virtual

void

 

SetChildOverride

(
    FBehaviorTreeSearchData & SearchDat...,
    int8 Index
)

Set override for next child index

Overridden from UBTNode

Name Description

Public function Virtual

void

 

DescribeRuntimeValues

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

Gathers description of all runtime parameters

Public function Virtual

uint16

 

GetInstanceMemorySize()

Size of instance memory

References

Module

AIModule

Header

Runtime/AIModule/Classes/BehaviorTree/BTCompositeNode.h