limboai/doc/source/classes/class_btcondition.rst

38 lines
2.4 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/BTCondition.xml.
.. _class_BTCondition:
BTCondition
===========
**Inherits:** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_BT>`
**Inherited By:** :ref:`BTCheckAgentProperty<class_BTCheckAgentProperty>`, :ref:`BTCheckTrigger<class_BTCheckTrigger>`, :ref:`BTCheckVar<class_BTCheckVar>`
Base class for BT conditions.
.. rst-class:: classref-introduction-group
Description
-----------
Base class for all :ref:`BehaviorTree<class_BehaviorTree>` conditions. You can create your own conditions by extending the **BTCondition** class.
Condition is a task within a :ref:`BehaviorTree<class_BehaviorTree>` that checks for a specific condition before executing subsequent tasks. It is often used inside composite tasks to control the execution flow. Conditions are used to verify the state of the environment, check for the presence of an enemy, or evaluate the health status of the agent. The use of condition tasks in a :ref:`BehaviorTree<class_BehaviorTree>` can improve system efficiency and prevent unnecessary actions. However, they may not be suitable for complex decision-making processes, and too many condition tasks can make the :ref:`BehaviorTree<class_BehaviorTree>` difficult to read.
Conditions typically don't take multiple ticks to finish and return either ``SUCCESS`` or ``FAILURE`` immediately.
.. |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.)`