limboai/doc/source/classes/class_btrunlimit.rst

126 lines
4.3 KiB
ReStructuredText
Raw Normal View History

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
2024-07-20 15:25:24 +00:00
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/master/modules/limboai/doc_classes/BTRunLimit.xml.
.. _class_BTRunLimit:
BTRunLimit
==========
**Inherits:** :ref:`BTDecorator<class_BTDecorator>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_BT>`
BT decorator that restricts the execution of its child a limited number of times.
.. rst-class:: classref-introduction-group
Description
-----------
BTRunLimit restricts the execution of the child task to a maximum number of times, defined by :ref:`run_limit<class_BTRunLimit_property_run_limit>`.
Returns ``FAILURE`` if the limit on executions is exceeded; otherwise, it returns the status of the child task.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
2024-02-14 19:34:18 +00:00
+-------------------------------------------------+-------------------------------------------------------------+-------+
| :ref:`CountPolicy<enum_BTRunLimit_CountPolicy>` | :ref:`count_policy<class_BTRunLimit_property_count_policy>` | ``0`` |
+-------------------------------------------------+-------------------------------------------------------------+-------+
2024-07-20 15:25:24 +00:00
| ``int`` | :ref:`run_limit<class_BTRunLimit_property_run_limit>` | ``1`` |
2024-02-14 19:34:18 +00:00
+-------------------------------------------------+-------------------------------------------------------------+-------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Enumerations
------------
.. _enum_BTRunLimit_CountPolicy:
.. rst-class:: classref-enumeration
2024-07-20 15:25:24 +00:00
enum **CountPolicy**: :ref:`🔗<enum_BTRunLimit_CountPolicy>`
2024-02-14 19:34:18 +00:00
.. _class_BTRunLimit_constant_COUNT_SUCCESSFUL:
.. rst-class:: classref-enumeration-constant
:ref:`CountPolicy<enum_BTRunLimit_CountPolicy>` **COUNT_SUCCESSFUL** = ``0``
Count only successful runs towards the limit.
.. _class_BTRunLimit_constant_COUNT_FAILED:
.. rst-class:: classref-enumeration-constant
:ref:`CountPolicy<enum_BTRunLimit_CountPolicy>` **COUNT_FAILED** = ``1``
Count only failed runs towards the limit.
.. _class_BTRunLimit_constant_COUNT_ALL:
.. rst-class:: classref-enumeration-constant
:ref:`CountPolicy<enum_BTRunLimit_CountPolicy>` **COUNT_ALL** = ``2``
Count successful and failed runs towards the limit.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
2024-02-14 19:34:18 +00:00
.. _class_BTRunLimit_property_count_policy:
.. rst-class:: classref-property
2024-07-20 15:25:24 +00:00
:ref:`CountPolicy<enum_BTRunLimit_CountPolicy>` **count_policy** = ``0`` :ref:`🔗<class_BTRunLimit_property_count_policy>`
2024-02-14 19:34:18 +00:00
.. rst-class:: classref-property-setget
2024-07-20 15:25:24 +00:00
- |void| **set_count_policy**\ (\ value\: :ref:`CountPolicy<enum_BTRunLimit_CountPolicy>`\ )
- :ref:`CountPolicy<enum_BTRunLimit_CountPolicy>` **get_count_policy**\ (\ )
2024-02-14 19:34:18 +00:00
Which runs should be counted towards the limit: successful, failed, or all?
.. rst-class:: classref-item-separator
----
.. _class_BTRunLimit_property_run_limit:
.. rst-class:: classref-property
2024-07-20 15:25:24 +00:00
``int`` **run_limit** = ``1`` :ref:`🔗<class_BTRunLimit_property_run_limit>`
.. rst-class:: classref-property-setget
2024-07-20 15:25:24 +00:00
- |void| **set_run_limit**\ (\ value\: ``int``\ )
- ``int`` **get_run_limit**\ (\ )
The maximum number of times the child is permitted to be executed.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
2024-07-20 15:25:24 +00:00
.. |void| replace:: :abbr:`void (No return value.)`