2
0

class_visualscriptfunctioncall.rst 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml.
  6. .. _class_VisualScriptFunctionCall:
  7. VisualScriptFunctionCall
  8. ========================
  9. **Inherits:** :ref:`VisualScriptNode<class_VisualScriptNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. A Visual Script node for calling a function.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **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.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
  21. | :ref:`String<class_String>` | :ref:`base_script<class_VisualScriptFunctionCall_property_base_script>` | |
  22. +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
  23. | :ref:`String<class_String>` | :ref:`base_type<class_VisualScriptFunctionCall_property_base_type>` | ``"Object"`` |
  24. +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
  25. | :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`basic_type<class_VisualScriptFunctionCall_property_basic_type>` | |
  26. +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
  27. | :ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` | :ref:`call_mode<class_VisualScriptFunctionCall_property_call_mode>` | ``0`` |
  28. +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
  29. | :ref:`String<class_String>` | :ref:`function<class_VisualScriptFunctionCall_property_function>` | ``""`` |
  30. +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
  31. | :ref:`NodePath<class_NodePath>` | :ref:`node_path<class_VisualScriptFunctionCall_property_node_path>` | |
  32. +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
  33. | :ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` | :ref:`rpc_call_mode<class_VisualScriptFunctionCall_property_rpc_call_mode>` | ``0`` |
  34. +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
  35. | :ref:`String<class_String>` | :ref:`singleton<class_VisualScriptFunctionCall_property_singleton>` | |
  36. +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
  37. | :ref:`int<class_int>` | :ref:`use_default_args<class_VisualScriptFunctionCall_property_use_default_args>` | |
  38. +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
  39. | :ref:`bool<class_bool>` | :ref:`validate<class_VisualScriptFunctionCall_property_validate>` | ``true`` |
  40. +---------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------+
  41. .. rst-class:: classref-section-separator
  42. ----
  43. .. rst-class:: classref-descriptions-group
  44. Enumerations
  45. ------------
  46. .. _enum_VisualScriptFunctionCall_CallMode:
  47. .. rst-class:: classref-enumeration
  48. enum **CallMode**:
  49. .. _class_VisualScriptFunctionCall_constant_CALL_MODE_SELF:
  50. .. rst-class:: classref-enumeration-constant
  51. :ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` **CALL_MODE_SELF** = ``0``
  52. The method will be called on this :ref:`Object<class_Object>`.
  53. .. _class_VisualScriptFunctionCall_constant_CALL_MODE_NODE_PATH:
  54. .. rst-class:: classref-enumeration-constant
  55. :ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` **CALL_MODE_NODE_PATH** = ``1``
  56. The method will be called on the given :ref:`Node<class_Node>` in the scene tree.
  57. .. _class_VisualScriptFunctionCall_constant_CALL_MODE_INSTANCE:
  58. .. rst-class:: classref-enumeration-constant
  59. :ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` **CALL_MODE_INSTANCE** = ``2``
  60. The method will be called on an instanced node with the given type and script.
  61. .. _class_VisualScriptFunctionCall_constant_CALL_MODE_BASIC_TYPE:
  62. .. rst-class:: classref-enumeration-constant
  63. :ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` **CALL_MODE_BASIC_TYPE** = ``3``
  64. The method will be called on a GDScript basic type (e.g. :ref:`Vector2<class_Vector2>`).
  65. .. _class_VisualScriptFunctionCall_constant_CALL_MODE_SINGLETON:
  66. .. rst-class:: classref-enumeration-constant
  67. :ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` **CALL_MODE_SINGLETON** = ``4``
  68. The method will be called on a singleton.
  69. .. rst-class:: classref-item-separator
  70. ----
  71. .. _enum_VisualScriptFunctionCall_RPCCallMode:
  72. .. rst-class:: classref-enumeration
  73. enum **RPCCallMode**:
  74. .. _class_VisualScriptFunctionCall_constant_RPC_DISABLED:
  75. .. rst-class:: classref-enumeration-constant
  76. :ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` **RPC_DISABLED** = ``0``
  77. The method will be called locally.
  78. .. _class_VisualScriptFunctionCall_constant_RPC_RELIABLE:
  79. .. rst-class:: classref-enumeration-constant
  80. :ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` **RPC_RELIABLE** = ``1``
  81. The method will be called remotely.
  82. .. _class_VisualScriptFunctionCall_constant_RPC_UNRELIABLE:
  83. .. rst-class:: classref-enumeration-constant
  84. :ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` **RPC_UNRELIABLE** = ``2``
  85. The method will be called remotely using an unreliable protocol.
  86. .. _class_VisualScriptFunctionCall_constant_RPC_RELIABLE_TO_ID:
  87. .. rst-class:: classref-enumeration-constant
  88. :ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` **RPC_RELIABLE_TO_ID** = ``3``
  89. The method will be called remotely for the given peer.
  90. .. _class_VisualScriptFunctionCall_constant_RPC_UNRELIABLE_TO_ID:
  91. .. rst-class:: classref-enumeration-constant
  92. :ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` **RPC_UNRELIABLE_TO_ID** = ``4``
  93. The method will be called remotely for the given peer, using an unreliable protocol.
  94. .. rst-class:: classref-section-separator
  95. ----
  96. .. rst-class:: classref-descriptions-group
  97. Property Descriptions
  98. ---------------------
  99. .. _class_VisualScriptFunctionCall_property_base_script:
  100. .. rst-class:: classref-property
  101. :ref:`String<class_String>` **base_script**
  102. .. rst-class:: classref-property-setget
  103. - void **set_base_script** **(** :ref:`String<class_String>` value **)**
  104. - :ref:`String<class_String>` **get_base_script** **(** **)**
  105. 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>`.
  106. .. rst-class:: classref-item-separator
  107. ----
  108. .. _class_VisualScriptFunctionCall_property_base_type:
  109. .. rst-class:: classref-property
  110. :ref:`String<class_String>` **base_type** = ``"Object"``
  111. .. rst-class:: classref-property-setget
  112. - void **set_base_type** **(** :ref:`String<class_String>` value **)**
  113. - :ref:`String<class_String>` **get_base_type** **(** **)**
  114. 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>`.
  115. .. rst-class:: classref-item-separator
  116. ----
  117. .. _class_VisualScriptFunctionCall_property_basic_type:
  118. .. rst-class:: classref-property
  119. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **basic_type**
  120. .. rst-class:: classref-property-setget
  121. - void **set_basic_type** **(** :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` value **)**
  122. - :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **get_basic_type** **(** **)**
  123. 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>`.
  124. .. rst-class:: classref-item-separator
  125. ----
  126. .. _class_VisualScriptFunctionCall_property_call_mode:
  127. .. rst-class:: classref-property
  128. :ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` **call_mode** = ``0``
  129. .. rst-class:: classref-property-setget
  130. - void **set_call_mode** **(** :ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` value **)**
  131. - :ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` **get_call_mode** **(** **)**
  132. ``call_mode`` determines the target object on which the method will be called. See :ref:`CallMode<enum_VisualScriptFunctionCall_CallMode>` for options.
  133. .. rst-class:: classref-item-separator
  134. ----
  135. .. _class_VisualScriptFunctionCall_property_function:
  136. .. rst-class:: classref-property
  137. :ref:`String<class_String>` **function** = ``""``
  138. .. rst-class:: classref-property-setget
  139. - void **set_function** **(** :ref:`String<class_String>` value **)**
  140. - :ref:`String<class_String>` **get_function** **(** **)**
  141. The name of the function to be called.
  142. .. rst-class:: classref-item-separator
  143. ----
  144. .. _class_VisualScriptFunctionCall_property_node_path:
  145. .. rst-class:: classref-property
  146. :ref:`NodePath<class_NodePath>` **node_path**
  147. .. rst-class:: classref-property-setget
  148. - void **set_base_path** **(** :ref:`NodePath<class_NodePath>` value **)**
  149. - :ref:`NodePath<class_NodePath>` **get_base_path** **(** **)**
  150. 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>`.
  151. .. rst-class:: classref-item-separator
  152. ----
  153. .. _class_VisualScriptFunctionCall_property_rpc_call_mode:
  154. .. rst-class:: classref-property
  155. :ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` **rpc_call_mode** = ``0``
  156. .. rst-class:: classref-property-setget
  157. - void **set_rpc_call_mode** **(** :ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` value **)**
  158. - :ref:`RPCCallMode<enum_VisualScriptFunctionCall_RPCCallMode>` **get_rpc_call_mode** **(** **)**
  159. 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.
  160. .. rst-class:: classref-item-separator
  161. ----
  162. .. _class_VisualScriptFunctionCall_property_singleton:
  163. .. rst-class:: classref-property
  164. :ref:`String<class_String>` **singleton**
  165. .. rst-class:: classref-property-setget
  166. - void **set_singleton** **(** :ref:`String<class_String>` value **)**
  167. - :ref:`String<class_String>` **get_singleton** **(** **)**
  168. 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>`.
  169. .. rst-class:: classref-item-separator
  170. ----
  171. .. _class_VisualScriptFunctionCall_property_use_default_args:
  172. .. rst-class:: classref-property
  173. :ref:`int<class_int>` **use_default_args**
  174. .. rst-class:: classref-property-setget
  175. - void **set_use_default_args** **(** :ref:`int<class_int>` value **)**
  176. - :ref:`int<class_int>` **get_use_default_args** **(** **)**
  177. 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.
  178. .. rst-class:: classref-item-separator
  179. ----
  180. .. _class_VisualScriptFunctionCall_property_validate:
  181. .. rst-class:: classref-property
  182. :ref:`bool<class_bool>` **validate** = ``true``
  183. .. rst-class:: classref-property-setget
  184. - void **set_validate** **(** :ref:`bool<class_bool>` value **)**
  185. - :ref:`bool<class_bool>` **get_validate** **(** **)**
  186. If ``false``, call errors (e.g. wrong number of arguments) will be ignored.
  187. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  188. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  189. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  190. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`