Class action_baseAbstract

Abstract class for implementation of GOAP planner actions.

Source

C++ class action_base

Custom Constructor

action_base

Hierarchy

Constructors

Properties

__name: string

Name of luabind class constructor.

__name: string

Name of luabind class instance constructor.

object: game_object

Game object that is handled by current action instance.

Container reference with state of action preconditions.

Methods

  • Add action effect. Describes what target world state is expected to be if action is completed.

    Parameters

    • property: world_property

      world state property describing a pair of evaluator ID and value

    Returns void

  • Add action execution precondition. When building logics graph, action will be considered blocked by some preconditions.

    Parameters

    • property: world_property

      world state property describing a pair of evaluator ID and value

    Returns void

  • Lifecycle method. Execution tick of the action, called from object logics update cycle when current action is active.

    Returns void

  • Lifecycle method called once on action execution stop. Means that action is finished / preconditions are not met anymore.

    Returns void

  • Lifecycle method called once on action execution start. Means that lifecycle of the action begun.

    Returns void

  • Remove action effect. Action will be not considered as property changing for id anymore

    Parameters

    • id: number

      world state property id

    Returns void

  • Remove precondition for action. When building logics graph, action will not be considered blocked by evaluator id states.

    Parameters

    • id: number

      world state property id

    Returns void

  • Set weight of current action execution.

    Parameters

    • weight: number

      weight value to express how prioritized action is

    Returns void

  • Handle setup of the action and binding to a specific object.

    Parameters

    Returns void

  • Debug method. With mixed / debug build allows investigation of evaluators and actions matches. Helps to debug custom actions and actions pre-conditions with state printing in log files.

    Note: Available only in mixed / debug engine builds, not for direct usage from lua.

    Parameters

    • Optional prefix: string

      string prefix to display current action state in logs

    Returns void

Generated using TypeDoc