UPawnAction

Things to remember: * Actions are created paused

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

AIModule

Header

/Engine/Source/Runtime/AIModule/Classes/Actions/PawnAction.h

Include

#include "Actions/PawnAction.h"

Syntax

class UPawnAction : public UObject

Remarks

Things to remember:

  • Actions are created paused

Variables

Name Description

Protected variable

uint32: 1

 

bAllowNewSameClassInstance

If this is FALSE and we're trying to push a new instance of a given class, but the top of the stack is already an instance of that class ignore the attempted push

Protected variable

uint32: 1

 

bAlwaysNotifyOnFinished

If set, action will call OnFinished notify even when ending as FailedToStart

Protected variable

UBrainComponent...

 

BrainComp

: THIS IS HERE ONLY BECAUSE OF THE WAY AI MESSAGING IS CURRENTLY IMPLEMENTED. WILL GO AWAY!

Protected variable

uint32: 1

 

bReplaceActiveSameClassInstance

If this is TRUE, when we try to push a new instance of an action who has the same class as the action on the top of the stack, pop the one on the stack, and push the new one NOTE: This trumps bAllowNewClassInstance (e.g. if this is true and bAllowNewClassInstance is false the active instance will still be replaced)

Protected variable

uint32: 1

 

bShouldPauseMovement

This is a temporary solution to allow having movement action running in background while there's another action on top doing its thing

Protected variable

uint32: 1

 

bWantsTick

TickAction will get called only if this flag is set.

Public variable

friend

 

FPawnActionStack

Protected variable

FAIRequestID

 

RequestID

Protected variable

FAIResourcesSet

 

RequiredResources

Specifies which resources will be locked by this action.

Public variable

friend

 

UPawnActionsComponent

Constructors

Name Description

Public function

UPawnAction

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Protected function

EPawnActionA...

 

Abort

(
    EAIForceParam::Type ShouldForce
)

Triggers aborting of an Action

Protected function

bool

 

Activate()

Starts or resumes action, depending on internal state

Public function Static

UPawnAction ...

 

CreateActionInstance

(
    UObject* WorldContextObject,
    TSubclassOf< UPawnAction > ActionCl...
)

Public function Static

TActionClass...

 

CreateActionInstance

(
    UWorld& World
)

Protected function Virtual

void

 

Finish

Public function Const

EPawnActionA...

 

GetAbortState()

Public function

TEnumAsByte<...

 

GetActionPriority()

Blueprint inlines.

Public function

UPawnAction ...

 

GetChildAction()

Public function Const

const UPawnA...

 

GetChildAction()

Public function Const

AController ...

 

GetController()

Public function Virtual Const

FString

 

GetDisplayName()

Public function Const

UObject *...

 

GetInstigator()

Public function Const

UPawnActions...

 

GetOwnerComponent()

Protected function

UPawnActions...

 

GetOwnerComponent()

Public function Const

const UPawnA...

 

GetParentAction()

Public function Const

APawn *

 

GetPawn()

Public function Const

EAIRequestPr...

 

GetPriority()

Public function Const

FString

 

GetPriorityName()

Public function Const

EPawnActionR...

 

GetResult()

Public function Const

FString

 

GetStateDescription()

Debug

Public function Virtual Const

UWorld *

 

GetWorld()

Begin UObject.

Public function Virtual

void

 

HandleAIMessage

(
    UBrainComponent*,
    const FAIMessage&
)

This function will change its signature once AI messaging is rewritten

Public function Const

bool

 

HasActionObserver()

Protected function Const

bool

 

HasBeenStarted()

Public function Const

bool

 

IsActive()

Public function Const

bool

 

IsBeingAborted()

Public function Const

bool

 

IsFinished()

Public function Const

bool

 

IsPaused()

Protected function Virtual

void

 

OnChildFinished

(
    UPawnAction& Action,
    EPawnActionResult::Type WithResult
)

Called to give Action chance to react to child action finishing.

Protected function Virtual

void

 

OnFinished

(
    EPawnActionResult::Type WithResult
)

Called when this action is being removed from action stacks

Protected function

void

 

OnPopped()

Protected function Virtual

bool

 

Pause

(
    const UPawnAction* PausedBy
)

Called to pause action when higher priority or child action kicks in

Protected function Virtual

EPawnActionA...

 

PerformAbort

(
    EAIForceParam::Type ShouldForce
)

Performs actual work on aborting Action. Should be called exclusively by Abort function

Protected function

bool

 

PushChildAction

(
    UPawnAction& Action
)

Apart from doing regular push request copies additional values from Parent, like Priority and Instigator

Protected function Virtual

bool

 

Resume()

Called to resume action after being paused

Protected function

void

 

SendEvent

(
    EPawnActionEventType::Type Event
)

Public function

void

 

SetActionObserver

(
    const FPawnActionEventDelegate& In...
)

Protected function

void

 

SetInstigator

(
    UObject*const InInstigator
)

Protected function

void

 

SetOwnerComponent

(
    UPawnActionsComponent* Compone...
)

Public function Const

bool

 

ShouldPauseMovement()

Protected function Virtual

bool

 

Start()

Called to start off the Action

Protected function

void

 

StopWaitingForMessages()

Protected function Virtual

void

 

Tick

(
    float DeltaTime
)

Protected function

void

 

TickAction

(
    float DeltaTime
)

Public function

void

 

WaitForMessage

(
    FName MessageType,
    FAIRequestID RequestID
)

Messaging

Public function Const

bool

 

WantsTick()

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