limboai/doc/source/classes/class_btevaluateexpression.rst

197 lines
8.4 KiB
ReStructuredText
Raw Normal View History

2024-02-18 19:25:53 +00:00
:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/4.2/modules/limboai/doc_classes/BTEvaluateExpression.xml.
.. _class_BTEvaluateExpression:
BTEvaluateExpression
====================
**Inherits:** :ref:`BTAction<class_BTAction>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_BT>`
BT action that evaluates an ``Expression`` against a specified ``Node`` or ``Object``.
.. rst-class:: classref-introduction-group
Description
-----------
BTEvaluateExpression action evaluates an :ref:`expression_string<class_BTEvaluateExpression_property_expression_string>` on the specified ``Node`` or ``Object`` instance and returns ``SUCCESS`` when the ``Expression`` executes successfully.
Returns ``FAILURE`` if the action encounters an issue during the ``Expression`` parsing or execution.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-------------------------------------+-------------------------------------------------------------------------------------+-------------------------+
| String | :ref:`expression_string<class_BTEvaluateExpression_property_expression_string>` | ``""`` |
+-------------------------------------+-------------------------------------------------------------------------------------+-------------------------+
| bool | :ref:`input_include_delta<class_BTEvaluateExpression_property_input_include_delta>` | ``false`` |
+-------------------------------------+-------------------------------------------------------------------------------------+-------------------------+
| PackedStringArray | :ref:`input_names<class_BTEvaluateExpression_property_input_names>` | ``PackedStringArray()`` |
+-------------------------------------+-------------------------------------------------------------------------------------+-------------------------+
| :ref:`BBVariant[]<class_BBVariant>` | :ref:`input_values<class_BTEvaluateExpression_property_input_values>` | ``[]`` |
+-------------------------------------+-------------------------------------------------------------------------------------+-------------------------+
| :ref:`BBNode<class_BBNode>` | :ref:`node<class_BTEvaluateExpression_property_node>` | |
+-------------------------------------+-------------------------------------------------------------------------------------+-------------------------+
2024-03-04 15:14:47 +00:00
| StringName | :ref:`result_var<class_BTEvaluateExpression_property_result_var>` | ``&""`` |
2024-02-18 19:25:53 +00:00
+-------------------------------------+-------------------------------------------------------------------------------------+-------------------------+
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+---------------------------------------+-------------------------------------------------------------------+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`parse<class_BTEvaluateExpression_method_parse>` **(** **)** |
+---------------------------------------+-------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_BTEvaluateExpression_property_expression_string:
.. rst-class:: classref-property
String **expression_string** = ``""``
.. rst-class:: classref-property-setget
- void **set_expression_string** **(** String value **)**
- String **get_expression_string** **(** **)**
The expression string to be parsed and executed.
\ **Warning:** Call :ref:`parse<class_BTEvaluateExpression_method_parse>` after updating :ref:`expression_string<class_BTEvaluateExpression_property_expression_string>` to update the internal ``Expression`` as it won't be updated automatically.
.. rst-class:: classref-item-separator
----
.. _class_BTEvaluateExpression_property_input_include_delta:
.. rst-class:: classref-property
bool **input_include_delta** = ``false``
.. rst-class:: classref-property-setget
- void **set_input_include_delta** **(** bool value **)**
- bool **is_input_delta_included** **(** **)**
If enabled, the input variable ``delta`` will be added to :ref:`input_names<class_BTEvaluateExpression_property_input_names>` and :ref:`input_values<class_BTEvaluateExpression_property_input_values>`.
\ **Warning:** Call :ref:`parse<class_BTEvaluateExpression_method_parse>` after toggling :ref:`input_include_delta<class_BTEvaluateExpression_property_input_include_delta>` to update the internal ``Expression`` as it won't be updated automatically.
.. rst-class:: classref-item-separator
----
.. _class_BTEvaluateExpression_property_input_names:
.. rst-class:: classref-property
PackedStringArray **input_names** = ``PackedStringArray()``
.. rst-class:: classref-property-setget
- void **set_input_names** **(** PackedStringArray value **)**
- PackedStringArray **get_input_names** **(** **)**
List of variable names within :ref:`expression_string<class_BTEvaluateExpression_property_expression_string>` for which the user will provide values for through :ref:`input_values<class_BTEvaluateExpression_property_input_values>`.
\ **Warning:** Call :ref:`parse<class_BTEvaluateExpression_method_parse>` after updating :ref:`input_names<class_BTEvaluateExpression_property_input_names>` to update the internal ``Expression`` as it won't be updated automatically.
.. rst-class:: classref-item-separator
----
.. _class_BTEvaluateExpression_property_input_values:
.. rst-class:: classref-property
:ref:`BBVariant[]<class_BBVariant>` **input_values** = ``[]``
.. rst-class:: classref-property-setget
- void **set_input_values** **(** :ref:`BBVariant[]<class_BBVariant>` value **)**
- :ref:`BBVariant[]<class_BBVariant>` **get_input_values** **(** **)**
List of values for variables specified in :ref:`input_names<class_BTEvaluateExpression_property_input_names>`. The values are mapped to the variables by their array index.
.. rst-class:: classref-item-separator
----
.. _class_BTEvaluateExpression_property_node:
.. rst-class:: classref-property
:ref:`BBNode<class_BBNode>` **node**
.. rst-class:: classref-property-setget
- void **set_node_param** **(** :ref:`BBNode<class_BBNode>` value **)**
- :ref:`BBNode<class_BBNode>` **get_node_param** **(** **)**
Specifies the ``Node`` or ``Object`` instance containing the method to be called.
.. rst-class:: classref-item-separator
----
.. _class_BTEvaluateExpression_property_result_var:
.. rst-class:: classref-property
2024-03-04 15:14:47 +00:00
StringName **result_var** = ``&""``
2024-02-18 19:25:53 +00:00
.. rst-class:: classref-property-setget
2024-03-04 15:14:47 +00:00
- void **set_result_var** **(** StringName value **)**
- StringName **get_result_var** **(** **)**
2024-02-18 19:25:53 +00:00
if non-empty, assign the result of the method call to the blackboard variable specified by this property.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_BTEvaluateExpression_method_parse:
.. rst-class:: classref-method
:ref:`Error<enum_@GlobalScope_Error>` **parse** **(** **)**
Calls :ref:`Expression.parse<class_Expression_method_parse>` considering :ref:`input_include_delta<class_BTEvaluateExpression_property_input_include_delta>` and :ref:`input_names<class_BTEvaluateExpression_property_input_names>` and returns its error code.
.. |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.)`