Jido.BehaviorTree.Nodes.Failer (Jido Behavior Tree v1.0.0)

View Source

A decorator node that always returns failure when its child completes.

  • If child returns :success or :failure, failer returns :failure
  • If child returns :running, failer returns :running
  • Errors are passed through unchanged

Example

failer = Failer.new(some_action)
# Always fails even if some_action succeeds

Summary

Functions

Creates a new Failer node wrapping the given child.

Returns the Zoi schema for this module

Context-aware tick that preserves child tick mutations.

Types

t()

@type t() :: %Jido.BehaviorTree.Nodes.Failer{child: any()}

Functions

new(child)

@spec new(Jido.BehaviorTree.Node.t()) :: t()

Creates a new Failer node wrapping the given child.

Examples

iex> Failer.new(child_node)
%Failer{child: child_node}

schema()

Returns the Zoi schema for this module

tick_with_context(state, tick)

Context-aware tick that preserves child tick mutations.