unreal.PawnAction

class unreal.PawnAction(outer=None, name='None')

Bases: unreal.Object

Things to remember: * Actions are created paused

C++ Source:

  • Module: AIModule

  • File: PawnAction.h

Editor Properties: (see get_editor_property/set_editor_property)

  • allow_new_same_class_instance (bool): [Read-Write] Allow New Same Class Instance: 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

  • always_notify_on_finished (bool): [Read-Write] Always Notify on Finished: if set, action will call OnFinished notify even when ending as FailedToStart

  • replace_active_same_class_instance (bool): [Read-Write] Replace Active Same Class Instance: 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)

  • should_pause_movement (bool): [Read-Write] Should Pause Movement: this is a temporary solution to allow having movement action running in background while there’s

    another action on top doing its thing

    note: should go away once AI resource locking comes on-line

property allow_new_same_class_instance

[Read-Only] Allow New Same Class Instance: 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

Type

(bool)

property always_notify_on_finished

[Read-Write] Always Notify on Finished: if set, action will call OnFinished notify even when ending as FailedToStart

Type

(bool)

classmethod create_action_instance(world_context_object, action_class) PawnAction

Create Action Instance

Parameters
Return type

PawnAction

finish(with_result) None

Finish

Parameters

with_result (PawnActionResult) –

get_action_priority() AIRequestPriority

Blueprint interface

Return type

AIRequestPriority

property replace_active_same_class_instance

[Read-Write] Replace Active Same Class Instance: 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)

Type

(bool)

property should_pause_movement

[Read-Write] Should Pause Movement: this is a temporary solution to allow having movement action running in background while there’s

another action on top doing its thing

note: should go away once AI resource locking comes on-line

Type

(bool)