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

View Source

A leaf node that waits for a specified duration.

Returns :running until the duration has elapsed, then returns :success.

Example

wait = Wait.new(1000)  # Wait 1 second
# Returns :running until 1000ms has passed

Summary

Functions

Creates a new Wait node with the specified duration.

Returns the Zoi schema for this module

Types

t()

@type t() :: %Jido.BehaviorTree.Nodes.Wait{
  duration_ms: integer(),
  start_time: nil | any()
}

Functions

new(duration_ms)

@spec new(non_neg_integer()) :: t()

Creates a new Wait node with the specified duration.

Examples

iex> Wait.new(1000)
%Wait{duration_ms: 1000, start_time: nil}

schema()

Returns the Zoi schema for this module