From f4289ca8398c175f05a9c0a4243a208885034de9 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Thu, 28 Sep 2023 13:45:28 +0200 Subject: [PATCH] Improve BTDynamic{Sequence,Selector} class docs --- doc_classes/BTDynamicSelector.xml | 10 +++++----- doc_classes/BTDynamicSequence.xml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc_classes/BTDynamicSelector.xml b/doc_classes/BTDynamicSelector.xml index 71f799f..a855dbd 100644 --- a/doc_classes/BTDynamicSelector.xml +++ b/doc_classes/BTDynamicSelector.xml @@ -1,13 +1,13 @@ - BT composite that executes tasks from the beginning each tick until first [code]SUCCESS[/code]. + BT composite that executes tasks from scratch every tick until first [code]SUCCESS[/code]. - BT composite that executes child tasks from first to last until any child returns [code]SUCCESS[/code]. BTDynamicSelector will execute tasks from the beginning each tick, reevaluating their statuses. - Returns [code]RUNNING[/code] if a task returns [code]RUNNING[/code], and remembers last [code]RUNNING[/code] child. In contrast to normal selector, on the next execution tick it will reexecute preceeding tasks and reevaluate their return statuses. If any of the preceeding tasks does not return [code]FAILURE[/code], it will cancel execution of the remembered [code]RUNNING[/code] task. - Returns [code]FAILURE[/code] if all tasks return [code]FAILURE[/code]. - Returns [code]SUCCESS[/code] if any task returns [code]SUCCESS[/code]. + BTDynamicSelector executes its child tasks sequentially, from first to last, until any child returns [code]SUCCESS[/code]. Unlike [BTSelector], it will execute tasks from the beginning every tick, reevaluating their statuses. It is quite useful when you want to retry higher-priority behaviors in every tick. + Returns [code]RUNNING[/code] if a child task results in [code]RUNNING[/code]. BTDynamicSelector will remember the last [code]RUNNING[/code] child, but, unlike [BTSequence], on the next execution tick, it will reexecute preceding tasks and reevaluate their return statuses. If any of the preceding tasks doesn't result in [code]FAILURE[/code], it will abort the remembered [code]RUNNING[/code] task. + Returns [code]FAILURE[/code] if all child tasks result in [code]FAILURE[/code]. + Returns [code]SUCCESS[/code] if a child task results in [code]SUCCESS[/code]. diff --git a/doc_classes/BTDynamicSequence.xml b/doc_classes/BTDynamicSequence.xml index 0b321f7..c79f375 100644 --- a/doc_classes/BTDynamicSequence.xml +++ b/doc_classes/BTDynamicSequence.xml @@ -1,13 +1,13 @@ - BT composite that executes tasks from the beginning each tick for as long as they return [code]SUCCESS[/code]. + BT composite that executes tasks from scratch every tick as long as they return [code]SUCCESS[/code]. - BT composite that executes child tasks from first to last for as long as they return [code]SUCCESS[/code]. BTDynamicSequence will execute tasks from the beginning each tick, reevaluating their statuses. - Returns [code]RUNNING[/code] if a task returns [code]RUNNING[/code], and remembers last [code]RUNNING[/code] child. In contrast to [BTSequence], on the next execution tick it will reexecute preceeding tasks and reevaluate their return statuses. If any of the preceeding tasks does not return [code]SUCCESS[/code], it will cancel execution of the remembered [code]RUNNING[/code] task. - Returns [code]FAILURE[/code] if any task returns [code]FAILURE[/code]. - Returns [code]SUCCESS[/code] if all tasks return [code]SUCCESS[/code]. + BTDynamicSequence executes its child tasks sequentially, from first to last, for as long as they return [code]SUCCESS[/code]. Unlike [BTSequence], it will execute tasks from the beginning every tick, reevaluating their statuses. It is quite useful when you want to recheck conditions preceding a long-running action during each tick and abort the [code]RUNNING[/code] action when any condition results in [code]FAILURE[/code]. + Returns [code]RUNNING[/code] if a child task results in [code]RUNNING[/code]. BTDynamicSequence will remember the last [code]RUNNING[/code] child, but, unlike [BTSequence], on the next execution tick, it will reexecute preceding tasks and reevaluate their return statuses. If any of the preceding tasks doesn't result in [code]SUCCESS[/code], it will abort the remembered [code]RUNNING[/code] task. + Returns [code]FAILURE[/code] if a child task results in [code]FAILURE[/code]. + Returns [code]SUCCESS[/code] if all child tasks result in [code]SUCCESS[/code].