337 lines
13 KiB
ReStructuredText
337 lines
13 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/3.6/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml.
|
|
|
|
.. _class_VisualScriptFunctionCall:
|
|
|
|
VisualScriptFunctionCall
|
|
========================
|
|
|
|
**Inherits:** :ref:`VisualScriptNode<class_VisualScriptNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
|
|
|
A Visual Script node for calling a function.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Description
|
|
-----------
|
|
|
|
**VisualScriptFunctionCall** is created when you add or drag and drop a function onto the Visual Script graph. It allows to tweak parameters of the call, e.g. what object the function is called on.
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Properties
|
|
----------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
|
|
| :ref:`String<class_String>` | :ref:`base_script<class_VisualScriptFunctionCall_property_base_script>` | |
|
|
+---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
|
|
| :ref:`String<class_String>` | :ref:`base_type<class_VisualScriptFunctionCall_property_base_type>` | ``"Object"`` |
|
|
+---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
|
|
| :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`basic_type<class_VisualScriptFunctionCall_property_basic_type>` | |
|
|
+---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
|
|
| :ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` | :ref:`call_mode<class_VisualScriptFunctionCall_property_call_mode>` | ``0`` |
|
|
+---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
|
|
| :ref:`String<class_String>` | :ref:`function<class_VisualScriptFunctionCall_property_function>` | ``""`` |
|
|
+---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
|
|
| :ref:`NodePath<class_NodePath>` | :ref:`node_path<class_VisualScriptFunctionCall_property_node_path>` | |
|
|
+---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
|
|
| :ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` | :ref:`rpc_call_mode<class_VisualScriptFunctionCall_property_rpc_call_mode>` | ``0`` |
|
|
+---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
|
|
| :ref:`String<class_String>` | :ref:`singleton<class_VisualScriptFunctionCall_property_singleton>` | |
|
|
+---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
|
|
| :ref:`int<class_int>` | :ref:`use_default_args<class_VisualScriptFunctionCall_property_use_default_args>` | |
|
|
+---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
|
|
| :ref:`bool<class_bool>` | :ref:`validate<class_VisualScriptFunctionCall_property_validate>` | ``true`` |
|
|
+---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Enumerations
|
|
------------
|
|
|
|
.. _enum_VisualScriptFunctionCall_CallMode:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **CallMode**:
|
|
|
|
.. _class_VisualScriptFunctionCall_constant_CALL_MODE_SELF:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` **CALL_MODE_SELF** = ``0``
|
|
|
|
The method will be called on this :ref:`Object<class_Object>`.
|
|
|
|
.. _class_VisualScriptFunctionCall_constant_CALL_MODE_NODE_PATH:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` **CALL_MODE_NODE_PATH** = ``1``
|
|
|
|
The method will be called on the given :ref:`Node<class_Node>` in the scene tree.
|
|
|
|
.. _class_VisualScriptFunctionCall_constant_CALL_MODE_INSTANCE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` **CALL_MODE_INSTANCE** = ``2``
|
|
|
|
The method will be called on an instanced node with the given type and script.
|
|
|
|
.. _class_VisualScriptFunctionCall_constant_CALL_MODE_BASIC_TYPE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` **CALL_MODE_BASIC_TYPE** = ``3``
|
|
|
|
The method will be called on a GDScript basic type (e.g. :ref:`Vector2<class_Vector2>`).
|
|
|
|
.. _class_VisualScriptFunctionCall_constant_CALL_MODE_SINGLETON:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` **CALL_MODE_SINGLETON** = ``4``
|
|
|
|
The method will be called on a singleton.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _enum_VisualScriptFunctionCall_RPCCallMode:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **RPCCallMode**:
|
|
|
|
.. _class_VisualScriptFunctionCall_constant_RPC_DISABLED:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` **RPC_DISABLED** = ``0``
|
|
|
|
The method will be called locally.
|
|
|
|
.. _class_VisualScriptFunctionCall_constant_RPC_RELIABLE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` **RPC_RELIABLE** = ``1``
|
|
|
|
The method will be called remotely.
|
|
|
|
.. _class_VisualScriptFunctionCall_constant_RPC_UNRELIABLE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` **RPC_UNRELIABLE** = ``2``
|
|
|
|
The method will be called remotely using an unreliable protocol.
|
|
|
|
.. _class_VisualScriptFunctionCall_constant_RPC_RELIABLE_TO_ID:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` **RPC_RELIABLE_TO_ID** = ``3``
|
|
|
|
The method will be called remotely for the given peer.
|
|
|
|
.. _class_VisualScriptFunctionCall_constant_RPC_UNRELIABLE_TO_ID:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` **RPC_UNRELIABLE_TO_ID** = ``4``
|
|
|
|
The method will be called remotely for the given peer, using an unreliable protocol.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_VisualScriptFunctionCall_property_base_script:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`String<class_String>` **base_script**
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_base_script** **(** :ref:`String<class_String>` value **)**
|
|
- :ref:`String<class_String>` **get_base_script** **(** **)**
|
|
|
|
The script to be used when :ref:`call_mode<class_VisualScriptFunctionCall_property_call_mode>` is set to :ref:`CALL_MODE_INSTANCE<class_VisualScriptFunctionCall_constant_CALL_MODE_INSTANCE>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VisualScriptFunctionCall_property_base_type:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`String<class_String>` **base_type** = ``"Object"``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_base_type** **(** :ref:`String<class_String>` value **)**
|
|
- :ref:`String<class_String>` **get_base_type** **(** **)**
|
|
|
|
The base type to be used when :ref:`call_mode<class_VisualScriptFunctionCall_property_call_mode>` is set to :ref:`CALL_MODE_INSTANCE<class_VisualScriptFunctionCall_constant_CALL_MODE_INSTANCE>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VisualScriptFunctionCall_property_basic_type:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **basic_type**
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_basic_type** **(** :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` value **)**
|
|
- :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **get_basic_type** **(** **)**
|
|
|
|
The type to be used when :ref:`call_mode<class_VisualScriptFunctionCall_property_call_mode>` is set to :ref:`CALL_MODE_BASIC_TYPE<class_VisualScriptFunctionCall_constant_CALL_MODE_BASIC_TYPE>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VisualScriptFunctionCall_property_call_mode:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` **call_mode** = ``0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_call_mode** **(** :ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` value **)**
|
|
- :ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` **get_call_mode** **(** **)**
|
|
|
|
``call_mode`` determines the target object on which the method will be called. See :ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` for options.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VisualScriptFunctionCall_property_function:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`String<class_String>` **function** = ``""``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_function** **(** :ref:`String<class_String>` value **)**
|
|
- :ref:`String<class_String>` **get_function** **(** **)**
|
|
|
|
The name of the function to be called.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VisualScriptFunctionCall_property_node_path:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`NodePath<class_NodePath>` **node_path**
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_base_path** **(** :ref:`NodePath<class_NodePath>` value **)**
|
|
- :ref:`NodePath<class_NodePath>` **get_base_path** **(** **)**
|
|
|
|
The node path to use when :ref:`call_mode<class_VisualScriptFunctionCall_property_call_mode>` is set to :ref:`CALL_MODE_NODE_PATH<class_VisualScriptFunctionCall_constant_CALL_MODE_NODE_PATH>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VisualScriptFunctionCall_property_rpc_call_mode:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` **rpc_call_mode** = ``0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_rpc_call_mode** **(** :ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` value **)**
|
|
- :ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` **get_rpc_call_mode** **(** **)**
|
|
|
|
The mode for RPC calls. See :ref:`Node.rpc<class_Node_method_rpc>` for more details and :ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` for available options.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VisualScriptFunctionCall_property_singleton:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`String<class_String>` **singleton**
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_singleton** **(** :ref:`String<class_String>` value **)**
|
|
- :ref:`String<class_String>` **get_singleton** **(** **)**
|
|
|
|
The singleton to call the method on. Used when :ref:`call_mode<class_VisualScriptFunctionCall_property_call_mode>` is set to :ref:`CALL_MODE_SINGLETON<class_VisualScriptFunctionCall_constant_CALL_MODE_SINGLETON>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VisualScriptFunctionCall_property_use_default_args:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **use_default_args**
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_use_default_args** **(** :ref:`int<class_int>` value **)**
|
|
- :ref:`int<class_int>` **get_use_default_args** **(** **)**
|
|
|
|
Number of default arguments that will be used when calling the function. Can't be higher than the number of available default arguments in the method's declaration.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_VisualScriptFunctionCall_property_validate:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **validate** = ``true``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- void **set_validate** **(** :ref:`bool<class_bool>` value **)**
|
|
- :ref:`bool<class_bool>` **get_validate** **(** **)**
|
|
|
|
If ``false``, call errors (e.g. wrong number of arguments) will be ignored.
|
|
|
|
.. |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.)`
|
|
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|