Navigation
API > API/Runtime > API/Runtime/AIModule
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.
| Name | UBTTask_BlueprintBase |
| Type | class |
| Header File | /Engine/Source/Runtime/AIModule/Classes/BehaviorTree/Tasks/BTTask_BlueprintBase.h |
| Include Path | #include "BehaviorTree/Tasks/BTTask_BlueprintBase.h" |
Syntax
UCLASS (Abstract, Blueprintable, MinimalAPI)
class UBTTask_BlueprintBase : public UBTTaskNode
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UBTNode → UBTTaskNode → UBTTask_BlueprintBase
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UBTTask_BlueprintBase
(
const FObjectInitializer& ObjectInitializer |
BehaviorTree/Tasks/BTTask_BlueprintBase.h |
Functions
Public
Overridden from UBTTaskNode
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual EBTNodeResult::Type AbortTask
(
UBehaviorTreeComponent& OwnerComp, |
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! | BehaviorTree/Tasks/BTTask_BlueprintBase.h | |
virtual EBTNodeResult::Type ExecuteTask
(
UBehaviorTreeComponent& OwnerComp, |
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! | BehaviorTree/Tasks/BTTask_BlueprintBase.h | |
virtual void OnTaskFinished
(
UBehaviorTreeComponent& OwnerComp, |
Called when task execution is finished this function should be considered as const (don't modify state of object) if node is not instanced! bNotifyTaskFinished must be set to true for this function to be called Calling INIT_TASK_NODE_NOTIFY_FLAGS in the constructor of the task will set this flag automatically | BehaviorTree/Tasks/BTTask_BlueprintBase.h |
Overridden from UBTNode
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void DescribeRuntimeValues
(
const UBehaviorTreeComponent& OwnerComp, |
Gathers description of all runtime parameters | BehaviorTree/Tasks/BTTask_BlueprintBase.h | |
virtual FString GetStaticDescription() |
BehaviorTree/Tasks/BTTask_BlueprintBase.h | ||
virtual void InitializeFromAsset
(
UBehaviorTree& Asset |
Initialize any asset related data | BehaviorTree/Tasks/BTTask_BlueprintBase.h | |
virtual void OnInstanceDestroyed
(
UBehaviorTreeComponent& OwnerComp |
Called when node instance is removed from tree | BehaviorTree/Tasks/BTTask_BlueprintBase.h | |
| Gets called only for instanced nodes(bCreateNodeInstance == true). | BehaviorTree/Tasks/BTTask_BlueprintBase.h | ||
virtual bool UsesBlueprint() |
Get whether this node is using a blueprint for its logic | BehaviorTree/Tasks/BTTask_BlueprintBase.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void FinishAbort() |
Aborts task execution | BehaviorTree/Tasks/BTTask_BlueprintBase.h |
|
void FinishExecute
(
bool bSuccess |
Finishes task execution with Success or Fail result | BehaviorTree/Tasks/BTTask_BlueprintBase.h |
|
bool IsTaskAborting() |
Check if task is currently being aborted | BehaviorTree/Tasks/BTTask_BlueprintBase.h |
|
bool IsTaskExecuting() |
Check if task is currently being executed | BehaviorTree/Tasks/BTTask_BlueprintBase.h |
|
void ReceiveAbort
(
AActor* OwnerActor |
If blueprint graph contains this event, task will stay active until FinishAbort is called @Note 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 | BehaviorTree/Tasks/BTTask_BlueprintBase.h |
|
void ReceiveAbortAI
(
AAIController* OwnerController, |
Alternative AI version of ReceiveAbort | BehaviorTree/Tasks/BTTask_BlueprintBase.h |
|
void ReceiveExecute
(
AActor* OwnerActor |
Entry point, task will stay active until FinishExecute is called. | BehaviorTree/Tasks/BTTask_BlueprintBase.h |
|
void ReceiveExecuteAI
(
AAIController* OwnerController, |
Alternative AI version of ReceiveExecute | BehaviorTree/Tasks/BTTask_BlueprintBase.h |
|
void ReceiveTick
(
AActor* OwnerActor, |
Tick function @Note 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 | BehaviorTree/Tasks/BTTask_BlueprintBase.h |
|
void ReceiveTickAI
(
AAIController* OwnerController, |
Alternative AI version of tick function. | BehaviorTree/Tasks/BTTask_BlueprintBase.h |
|
void SetFinishOnMessage
(
FName MessageName |
Task execution will be finished (with result 'Success') after receiving specified message | BehaviorTree/Tasks/BTTask_BlueprintBase.h |
|
void SetFinishOnMessageWithId
(
FName MessageName, |
Task execution will be finished (with result 'Success') after receiving specified message with indicated ID | BehaviorTree/Tasks/BTTask_BlueprintBase.h |
|
Overridden from UBTTaskNode
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void TickTask
(
UBehaviorTreeComponent& OwnerComp, |
Ticks this task | BehaviorTree/Tasks/BTTask_BlueprintBase.h |