Skip to content

FlowPilotTask.h

File Info

FileName: FlowPilotTask.h

UFlowPilotTask

Parent Classes: [ UObject ]

FlowPilotTask

  • Can Tick

Properties

// If False, Will skip this Task's execution
UPROPERTY(EditDefaultsOnly, Category = "Task Options")
uint8 bEnabled: 1;

Functions

Setup

Setups Tasks. Called once per FlowPilotExecution, even after restarts.

virtual void Setup(FFlowContext* InContext);

Enter

Called when starting this Task. Returns true on success

virtual bool Enter();

Tick

Called on Tick. Will success automatically if not implemented by Child classes

virtual EFPTaskResult Tick(float DeltaTime);

Exit

Called when Task Finished

virtual void Exit(EFPTaskResult TaskResult);

Reset

Resets all Tasks into their Setup States

virtual void Reset();

IsEnabled

Disabled Tasks are skipped during execution

bool IsEnabled() const { return bEnabled; }

SetIsEnabled

Enables or Disables Task. Disabled Tasks will be skipped.

void SetIsEnabled(bool bInEnabled) { bEnabled = bInEnabled; }

GetTaskName

Returns Task Name

FName GetTaskName() const { return TaskName; }

SetTaskName

Sets Task Name

void SetTaskName(FName NewTaskName) { TaskName = NewTaskName; }

GetTaskDescription

Get Task Description

FName GetTaskDescription() const { return Description; }

HasParent

Returns True if Task has Parent Task.
Returns False if Task is Root Sequence Task

bool HasParent() const;

GetParent

Returns Parent Task or nullptr

UFlowPilotTask* GetParent() const;

SetParent

Sets Parent Task

void SetParent(UFlowPilotTask* InParent) { Parent = InParent; }

IsParent

Returns True if This task is a FlowPilotParent Task containing children Tasks.

bool IsParent() const;

GetAsParent

Returns this Cast to FlowPilotParent task.

UFlowPilotParent* GetAsParent();

HasStarted

Returns true when Task Started

bool HasStarted() const;

IsActive

Returns true when Task in Progress and Not Complete

bool IsActive() const;

IsComplete

Returns true when Task is Complete

bool IsComplete() const;

ForEachActor

Executes ‘InFunc’ to all Actors found from ‘ActorReference’

bool ForEachActor(const FFlowActorReference& ActorReference, TFunctionRef<bool(AActor* const /*Actor*/)> InFunc) const;

ForEachConstActor

Executes ‘InFunc’ to all const Actors found from ‘ActorReference’
Const means the function should not modify ‘Actors’

bool ForEachConstActor(const FFlowActorReference& ActorReference, TFunctionRef<bool(const AActor* const /*Actor*/)> InFunc) const;

GetFlowPilotComponent

Returns FlowPilotComponent

UFlowPilotComponent* GetFlowPilotComponent() const;

GetFlowPilotOwnerActor

Returns FlowPilotComponent Owner Actor

AActor* GetFlowPilotOwnerActor() const;

GetWorldContext

Returns FlowPilot Actor World

UWorld* GetWorldContext() const;