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
:successor: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
@type t() :: %Jido.BehaviorTree.Nodes.Failer{child: any()}
Functions
@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}
Returns the Zoi schema for this module
@spec tick_with_context(t(), Jido.BehaviorTree.Tick.t()) :: {Jido.BehaviorTree.Status.t(), t(), Jido.BehaviorTree.Tick.t()}
Context-aware tick that preserves child tick mutations.