BT composite that executes all of its child tasks simultaneously.
..rst-class:: classref-introduction-group
Description
-----------
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 ``RUNNING`` will be terminated, and the result will be either ``FAILURE`` or ``SUCCESS``. The :ref:`num_failures_required<class_BTParallel_property_num_failures_required>` determines when BTParallel fails and :ref:`num_successes_required<class_BTParallel_property_num_successes_required>` when it succeeds. When both are fullfilled, it gives priority to :ref:`num_failures_required<class_BTParallel_property_num_failures_required>`.
If set to :ref:`repeat<class_BTParallel_property_repeat>`, all child tasks will be re-executed each tick, regardless of whether they previously resulted in ``SUCCESS`` or ``FAILURE``.
Returns ``FAILURE`` when the required number of child tasks result in ``FAILURE``. When :ref:`repeat<class_BTParallel_property_repeat>` is set to ``false``, if none of the criteria were met and all child tasks resulted in either ``SUCCESS`` or ``FAILURE``, BTParallel will return ``FAILURE``.
Returns ``SUCCESS`` when the required number of child tasks result in ``SUCCESS``.
Returns ``RUNNING`` if none of the criterea were fulfilled, and either :ref:`repeat<class_BTParallel_property_repeat>` is set to ``true`` or a child task resulted in ``RUNNING``.