← All examples

godot components

Behavior tree with blackboard and decorators

Build behavior trees in code from sequences, selectors, a parallel, decorators (inverter, succeeder, repeater, cooldown), conditions, actions and waits, ticked with a shared blackboard and its own clock.

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • baltor_test.gd
  • behavior_tree.gd
  • component.json
  • inspect_gdscript.py
  • run_tests.gd
  • test_package.py
  • tests/test_behavior_tree.gd
  • verification/native.json

How it works

Class
BaltorBehaviorTree, extends RefCounted
Methods
tick(delta: float) -> int; reset() -> void; get_time() -> float; describe() -> String; sequence(tasks: Array, reactive: bool = false, label: String = "sequence") -> Task; selector(tasks: Array, reactive: bool = false, label: String = "selector") -> Task; parallel(tasks: Array, success_threshold: int, label: String = "parallel") -> Task; inverter(child: Task, label: String = "inverter") -> Task;…
Signals
ticked
Placement
res://baltor/godot_components/behavior_tree/

Recorded checks

godot 4.7.2.stable.official.ed1daf0bf

  • godot_parse_check_only
  • godot_gdscript_tests
  • godot_tests_reject_gutted_component
  • godot_editor_import
  • godot_contract_reflection
  • godot_readme_usage_compiles

Limits to consider

Trees are built in code, not in the editor; there is no visual editor or debugger beyond describe(). One child run per tick for the repeater. Reactive composites halt only the child that was running. Verified with Godot 4.7.2 headless; written against the Godot 4.3 API.