limboai/doc_classes/BTParallel.xml

28 lines
2.7 KiB
XML
Raw Normal View History

2022-11-01 20:31:22 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-04-10 14:57:36 +00:00
<class name="BTParallel" inherits="BTComposite" version="4.1" 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-09-27 15:08:51 +00:00
BT composite that executes all of its child tasks simultaneously.
2022-11-01 20:31:22 +00:00
</brief_description>
<description>
2023-09-27 15:08:51 +00:00
BTParallel executes all of its child tasks simultaneously. Note that BTParallel doesn't involve multithreading. It processes each task sequentially, from first to last, in the same tick before returning a result. If one of the abort criterea is met, any tasks currently [code]RUNNING[/code] will be terminated, and the result will be either [code]FAILURE[/code] or [code]SUCCESS[/code]. The [member num_failures_required] determines when BTParallel fails and [member num_successes_required] when it succeeds. When both are fullfilled, it gives priority to [member num_failures_required].
If set to [member repeat], all child tasks will be re-executed each tick, regardless of whether they previously resulted in [code]SUCCESS[/code] or [code]FAILURE[/code].
Returns [code]FAILURE[/code] when the required number of child tasks result in [code]FAILURE[/code]. When [member repeat] is set to [code]false[/code], if none of the criteria were met and all child tasks resulted in either [code]SUCCESS[/code] or [code]FAILURE[/code], BTParallel will return [code]FAILURE[/code].
Returns [code]SUCCESS[/code] when the required number of child tasks result in [code]SUCCESS[/code].
2023-08-23 11:24:22 +00:00
Returns [code]RUNNING[/code] if none of the criterea were fulfilled, and either [member repeat] is set to [code]true[/code] or a child task resulted in [code]RUNNING[/code].
2022-11-01 20:31:22 +00:00
</description>
<tutorials>
</tutorials>
<members>
<member name="num_failures_required" type="int" setter="set_num_failures_required" getter="get_num_failures_required" default="1">
2023-09-27 15:08:51 +00:00
If the specified number of child tasks return [code]SUCCESS[/code], BTParallel will also return [code]SUCCESS[/code].
2022-11-01 20:31:22 +00:00
</member>
<member name="num_successes_required" type="int" setter="set_num_successes_required" getter="get_num_successes_required" default="1">
2023-09-27 15:08:51 +00:00
If the specified number of child tasks return [code]FAILURE[/code], BTParallel will also return [code]FAILURE[/code].
2022-11-01 20:31:22 +00:00
</member>
<member name="repeat" type="bool" setter="set_repeat" getter="get_repeat" default="false">
2023-08-23 11:24:22 +00:00
When [code]true[/code], the child tasks will be executed again, regardless of whether they previously resulted in a [code]SUCCESS[/code] or [code]FAILURE[/code].
When [code]false[/code], if none of the criteria were met, and all child tasks resulted in a [code]SUCCESS[/code] or [code]FAILURE[/code], BTParallel will return [code]FAILURE[/code].
2022-11-01 20:31:22 +00:00
</member>
</members>
</class>