Built-in Node Library#

The omni.behavior.tree.core extension provides the built-in node library. These types are always available when the behavior tree system is enabled.

Composite Nodes#

Composite nodes control the execution flow of their children.

Type

Description

Ports

Sequence

Ticks children in order; fails on first failure (AND gate).

(none)

Selector

Ticks children in order; succeeds on first success (OR gate).

shuffle · bool · default false — randomize child order each reset

Parallel

Ticks all children concurrently each tick. Completes when either threshold is reached.

success_count · int · default -1 (all children must succeed)
failure_count · int · default 1

Action Nodes#

Action nodes are leaf nodes that perform work and return a status.

Type

Description

Ports

Wait

Returns RUNNING for a duration, then SUCCESS.

duration · float · default 1.0

SetBlackboard

Writes a value to a blackboard slot. The slot port is pointer-style — a BlackboardRef carrying the (blackboard, key) pair to write to.

slot · BlackboardRef
value · any type · optional

LogMessage

Logs a message and returns SUCCESS.

message · string

DispatchEvent

Fires a named carb event.

event_name · string
payload_key · string · default ""
blackboard_key · string · default ""

PushQueue

Appends an item to a FIFO queue stored at a blackboard slot. unique=true skips the push when the item is already present.

queue · BlackboardRef · pointer-style slot reference
item · any type
unique · bool · default false

Modifier Types#

Modifiers attach to any node and wrap its execution. They support Abort Mode for reactive behavior (see User Guide for details on abort modes).

Type

Description

Input Ports

Output Ports

Repeat

Repeats child N times (counts completions).

count · int · default 0 (infinite)
break_on_failure · bool · default false

Retry

Re-ticks child on failure.

max_retries · int · default 0 (infinite)
reset_on_success · bool · default true

InvertStatus

Inverts child’s success/failure. RUNNING passes through.

ForceStatus

Returns configured status when child finishes.

status · string · default "success"
Choices: success, failure

Delay

Waits before ticking child.

duration · float · default 1.0

Timeout

Fails if child doesn’t finish in time.

duration · float · default 1.0

Cooldown

Ticks child, then waits before completing.

duration · float · default 1.0

CheckBlackboard

Checks a blackboard entry against a condition. Uses on_check_condition for abort mode integration.

key · string
query · string · default "IsSet"
Choices: IsSet, IsNotSet, Equals, NotEquals
compare_value · string

value · any

CheckEvent

Returns RUNNING until a carb event fires, then SUCCESS.

event_name · string
payload_key · string · default ""
blackboard_key · string · default ""
timeout · float · default 0.0 (wait indefinitely)

RandomUniformFloat

Samples a random float in [min, max), cached until reset.

min · float · default 0.0
max · float · default 1.0
seed · int · default 0 (negative = non-deterministic)

value · float

RandomUniformInt

Samples a random integer in [min, max], cached until reset.

min · int · default 0
max · int · default 100
seed · int · default 0 (negative = non-deterministic)

value · int

RandomChoice

Picks a random element from an array.

choices · array
seed · int · default 0 (negative = non-deterministic)

value · any

PopQueue

Atomically pops the head of a FIFO queue, binds it to the item output, and ticks the target. If the queue is empty, returns RUNNING (Wait) or FAILURE (Fail).

queue · BlackboardRef · pointer-style slot reference
on_empty · string · default "Wait" · Choices: Wait, Fail

item · any