UBTDecorator_ForceSuccess

Change node result to Success useful for creating optional branches in sequence

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

AIModule

Header

/Engine/Source/Runtime/AIModule/Classes/BehaviorTree/Decorators/BTDecorator_ForceSuccess.h

Include

#include "BehaviorTree/Decorators/BTDecorator_ForceSuccess.h"

Syntax

class UBTDecorator_ForceSuccess : public UBTDecorator

Remarks

Change node result to Success useful for creating optional branches in sequence

Forcing failed result was not implemented, because it doesn't make sense in both basic composites:

  • sequence = child nodes behind it will be never run

  • selector = would allow executing multiple nodes, turning it into a sequence...

Constructors

Name Description

Public function

UBTDecorator_ForceSuccess

(
    const FObjectInitializer& ObjectIn...
)

Overridden from UBTDecorator

Name Description

Protected function Virtual

void

 

OnNodeProcessed

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

Called when underlying node was processed (deactivated or failed to activate) this function should be considered as const (don't modify state of object) if node is not instanced! bNotifyProcessed must be set to true for this function to be called Calling INIT_DECORATOR_NODE_NOTIFY_FLAGS in the constructor of the decorator will set this flag automatically

Overridden from UBTNode

Name Description

Protected function Virtual Const

FName

 

GetNodeIconName()

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