:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/3.5/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml. .. _class_VisualScriptFunctionCall: VisualScriptFunctionCall ======================== **Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` A Visual Script node for calling a function. 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. Properties ---------- +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+ | :ref:`String` | :ref:`base_script` | | +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+ | :ref:`String` | :ref:`base_type` | ``"Object"`` | +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+ | :ref:`Variant.Type` | :ref:`basic_type` | | +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+ | :ref:`CallMode` | :ref:`call_mode` | ``0`` | +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+ | :ref:`String` | :ref:`function` | ``""`` | +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+ | :ref:`NodePath` | :ref:`node_path` | | +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+ | :ref:`RPCCallMode` | :ref:`rpc_call_mode` | ``0`` | +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+ | :ref:`String` | :ref:`singleton` | | +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+ | :ref:`int` | :ref:`use_default_args` | | +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+ | :ref:`bool` | :ref:`validate` | ``true`` | +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+ Enumerations ------------ .. _enum_VisualScriptFunctionCall_CallMode: .. _class_VisualScriptFunctionCall_constant_CALL_MODE_SELF: .. _class_VisualScriptFunctionCall_constant_CALL_MODE_NODE_PATH: .. _class_VisualScriptFunctionCall_constant_CALL_MODE_INSTANCE: .. _class_VisualScriptFunctionCall_constant_CALL_MODE_BASIC_TYPE: .. _class_VisualScriptFunctionCall_constant_CALL_MODE_SINGLETON: enum **CallMode**: - **CALL_MODE_SELF** = **0** --- The method will be called on this :ref:`Object`. - **CALL_MODE_NODE_PATH** = **1** --- The method will be called on the given :ref:`Node` in the scene tree. - **CALL_MODE_INSTANCE** = **2** --- The method will be called on an instanced node with the given type and script. - **CALL_MODE_BASIC_TYPE** = **3** --- The method will be called on a GDScript basic type (e.g. :ref:`Vector2`). - **CALL_MODE_SINGLETON** = **4** --- The method will be called on a singleton. ---- .. _enum_VisualScriptFunctionCall_RPCCallMode: .. _class_VisualScriptFunctionCall_constant_RPC_DISABLED: .. _class_VisualScriptFunctionCall_constant_RPC_RELIABLE: .. _class_VisualScriptFunctionCall_constant_RPC_UNRELIABLE: .. _class_VisualScriptFunctionCall_constant_RPC_RELIABLE_TO_ID: .. _class_VisualScriptFunctionCall_constant_RPC_UNRELIABLE_TO_ID: enum **RPCCallMode**: - **RPC_DISABLED** = **0** --- The method will be called locally. - **RPC_RELIABLE** = **1** --- The method will be called remotely. - **RPC_UNRELIABLE** = **2** --- The method will be called remotely using an unreliable protocol. - **RPC_RELIABLE_TO_ID** = **3** --- The method will be called remotely for the given peer. - **RPC_UNRELIABLE_TO_ID** = **4** --- The method will be called remotely for the given peer, using an unreliable protocol. Property Descriptions --------------------- .. _class_VisualScriptFunctionCall_property_base_script: - :ref:`String` **base_script** +----------+------------------------+ | *Setter* | set_base_script(value) | +----------+------------------------+ | *Getter* | get_base_script() | +----------+------------------------+ The script to be used when :ref:`call_mode` is set to :ref:`CALL_MODE_INSTANCE`. ---- .. _class_VisualScriptFunctionCall_property_base_type: - :ref:`String` **base_type** +-----------+----------------------+ | *Default* | ``"Object"`` | +-----------+----------------------+ | *Setter* | set_base_type(value) | +-----------+----------------------+ | *Getter* | get_base_type() | +-----------+----------------------+ The base type to be used when :ref:`call_mode` is set to :ref:`CALL_MODE_INSTANCE`. ---- .. _class_VisualScriptFunctionCall_property_basic_type: - :ref:`Variant.Type` **basic_type** +----------+-----------------------+ | *Setter* | set_basic_type(value) | +----------+-----------------------+ | *Getter* | get_basic_type() | +----------+-----------------------+ The type to be used when :ref:`call_mode` is set to :ref:`CALL_MODE_BASIC_TYPE`. ---- .. _class_VisualScriptFunctionCall_property_call_mode: - :ref:`CallMode` **call_mode** +-----------+----------------------+ | *Default* | ``0`` | +-----------+----------------------+ | *Setter* | set_call_mode(value) | +-----------+----------------------+ | *Getter* | get_call_mode() | +-----------+----------------------+ ``call_mode`` determines the target object on which the method will be called. See :ref:`CallMode` for options. ---- .. _class_VisualScriptFunctionCall_property_function: - :ref:`String` **function** +-----------+---------------------+ | *Default* | ``""`` | +-----------+---------------------+ | *Setter* | set_function(value) | +-----------+---------------------+ | *Getter* | get_function() | +-----------+---------------------+ The name of the function to be called. ---- .. _class_VisualScriptFunctionCall_property_node_path: - :ref:`NodePath` **node_path** +----------+----------------------+ | *Setter* | set_base_path(value) | +----------+----------------------+ | *Getter* | get_base_path() | +----------+----------------------+ The node path to use when :ref:`call_mode` is set to :ref:`CALL_MODE_NODE_PATH`. ---- .. _class_VisualScriptFunctionCall_property_rpc_call_mode: - :ref:`RPCCallMode` **rpc_call_mode** +-----------+--------------------------+ | *Default* | ``0`` | +-----------+--------------------------+ | *Setter* | set_rpc_call_mode(value) | +-----------+--------------------------+ | *Getter* | get_rpc_call_mode() | +-----------+--------------------------+ The mode for RPC calls. See :ref:`Node.rpc` for more details and :ref:`RPCCallMode` for available options. ---- .. _class_VisualScriptFunctionCall_property_singleton: - :ref:`String` **singleton** +----------+----------------------+ | *Setter* | set_singleton(value) | +----------+----------------------+ | *Getter* | get_singleton() | +----------+----------------------+ The singleton to call the method on. Used when :ref:`call_mode` is set to :ref:`CALL_MODE_SINGLETON`. ---- .. _class_VisualScriptFunctionCall_property_use_default_args: - :ref:`int` **use_default_args** +----------+-----------------------------+ | *Setter* | set_use_default_args(value) | +----------+-----------------------------+ | *Getter* | 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. ---- .. _class_VisualScriptFunctionCall_property_validate: - :ref:`bool` **validate** +-----------+---------------------+ | *Default* | ``true`` | +-----------+---------------------+ | *Setter* | set_validate(value) | +-----------+---------------------+ | *Getter* | 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.)`