limboai/doc_classes/BTSelector.xml

15 lines
1.4 KiB
XML
Raw Normal View History

2022-11-01 20:31:22 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BTSelector" inherits="BTComposite" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
2022-11-01 20:31:22 +00:00
<brief_description>
2023-08-23 11:24:22 +00:00
BT composite that sequentially executes tasks until first [code]SUCCESS[/code].
2022-11-01 20:31:22 +00:00
</brief_description>
<description>
BTSelector executes its child tasks sequentially, from first to last, until any child returns [code]SUCCESS[/code]. If a child task results in [code]FAILURE[/code], BTSelector will immediately execute the next child task until one of them returns [code]SUCCESS[/code] or all of them result in [code]FAILURE[/code]. BTSelector and [BTSequence] are two of the most common building blocks of behavior trees. Essentially, while [BTSequence] is similar to a boolean AND operation, BTSelector is similar to a boolean OR operation. Selectors enable the behavior tree to respond to changes in the environment and trigger transitions between various fallback behaviors.
Returns [code]RUNNING[/code] if a child task results in [code]RUNNING[/code]. BTSelector will remember the last child task that returned [code]RUNNING[/code], ensuring it resumes from that point in the next execution tick.
Returns [code]SUCCESS[/code] if a child task results in [code]SUCCESS[/code].
Returns [code]FAILURE[/code] if all child tasks result in [code]FAILURE[/code].
2022-11-01 20:31:22 +00:00
</description>
<tutorials>
</tutorials>
</class>