limboai/doc/source/classes/class_btcallmethod.rst

143 lines
5.1 KiB
ReStructuredText
Raw Normal View History

: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/BTCallMethod.xml.
.. _class_BTCallMethod:
BTCallMethod
============
**Inherits:** :ref:`BTAction<class_BTAction>` **<** :ref:`BTTask<class_BTTask>` **<** :ref:`BT<class_BT>`
BT action that calls a method on a specified ``Node`` or ``Object``.
.. rst-class:: classref-introduction-group
Description
-----------
BTCallMethod action calls a :ref:`method<class_BTCallMethod_property_method>` on the specified ``Node`` or ``Object`` instance and returns ``SUCCESS``.
Returns ``FAILURE`` if the action encounters an issue during the method execution.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-------------------------------------+---------------------------------------------------------------------------+-----------+
| :ref:`BBVariant[]<class_BBVariant>` | :ref:`args<class_BTCallMethod_property_args>` | ``[]`` |
+-------------------------------------+---------------------------------------------------------------------------+-----------+
| bool | :ref:`args_include_delta<class_BTCallMethod_property_args_include_delta>` | ``false`` |
+-------------------------------------+---------------------------------------------------------------------------+-----------+
| StringName | :ref:`method<class_BTCallMethod_property_method>` | ``&""`` |
+-------------------------------------+---------------------------------------------------------------------------+-----------+
| :ref:`BBNode<class_BBNode>` | :ref:`node<class_BTCallMethod_property_node>` | |
+-------------------------------------+---------------------------------------------------------------------------+-----------+
| String | :ref:`result_var<class_BTCallMethod_property_result_var>` | ``""`` |
+-------------------------------------+---------------------------------------------------------------------------+-----------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_BTCallMethod_property_args:
.. rst-class:: classref-property
:ref:`BBVariant[]<class_BBVariant>` **args** = ``[]``
.. rst-class:: classref-property-setget
- void **set_args** **(** :ref:`BBVariant[]<class_BBVariant>` value **)**
- :ref:`BBVariant[]<class_BBVariant>` **get_args** **(** **)**
The arguments to be passed when calling the method.
.. rst-class:: classref-item-separator
----
.. _class_BTCallMethod_property_args_include_delta:
.. rst-class:: classref-property
bool **args_include_delta** = ``false``
.. rst-class:: classref-property-setget
- void **set_include_delta** **(** bool value **)**
- bool **is_delta_included** **(** **)**
Include delta as a first parameter and shift the position of the rest of the arguments if any.
.. rst-class:: classref-item-separator
----
.. _class_BTCallMethod_property_method:
.. rst-class:: classref-property
StringName **method** = ``&""``
.. rst-class:: classref-property-setget
- void **set_method** **(** StringName value **)**
- StringName **get_method** **(** **)**
The name of the method to be called.
.. rst-class:: classref-item-separator
----
.. _class_BTCallMethod_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_BTCallMethod_property_result_var:
.. rst-class:: classref-property
String **result_var** = ``""``
.. rst-class:: classref-property-setget
- void **set_result_var** **(** String value **)**
- String **get_result_var** **(** **)**
if non-empty, assign the result of the method call to the blackboard variable specified by this property.
.. |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.)`