VisualScriptFunctionCall.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="VisualScriptFunctionCall" inherits="VisualScriptNode" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
  3. <brief_description>
  4. A Visual Script node for calling a function.
  5. </brief_description>
  6. <description>
  7. [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.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. </methods>
  13. <members>
  14. <member name="base_script" type="String" setter="set_base_script" getter="get_base_script">
  15. The script to be used when [member call_mode] is set to [constant CALL_MODE_INSTANCE].
  16. </member>
  17. <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default="&quot;Object&quot;">
  18. The base type to be used when [member call_mode] is set to [constant CALL_MODE_INSTANCE].
  19. </member>
  20. <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type">
  21. The type to be used when [member call_mode] is set to [constant CALL_MODE_BASIC_TYPE].
  22. </member>
  23. <member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptFunctionCall.CallMode" default="0">
  24. [code]call_mode[/code] determines the target object on which the method will be called. See [enum CallMode] for options.
  25. </member>
  26. <member name="function" type="String" setter="set_function" getter="get_function" default="&quot;&quot;">
  27. The name of the function to be called.
  28. </member>
  29. <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path">
  30. The node path to use when [member call_mode] is set to [constant CALL_MODE_NODE_PATH].
  31. </member>
  32. <member name="rpc_call_mode" type="int" setter="set_rpc_call_mode" getter="get_rpc_call_mode" enum="VisualScriptFunctionCall.RPCCallMode" default="0">
  33. The mode for RPC calls. See [method Node.rpc] for more details and [enum RPCCallMode] for available options.
  34. </member>
  35. <member name="singleton" type="String" setter="set_singleton" getter="get_singleton">
  36. The singleton to call the method on. Used when [member call_mode] is set to [constant CALL_MODE_SINGLETON].
  37. </member>
  38. <member name="use_default_args" type="int" setter="set_use_default_args" getter="get_use_default_args">
  39. 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.
  40. </member>
  41. <member name="validate" type="bool" setter="set_validate" getter="get_validate" default="true">
  42. If [code]false[/code], call errors (e.g. wrong number of arguments) will be ignored.
  43. </member>
  44. </members>
  45. <constants>
  46. <constant name="CALL_MODE_SELF" value="0" enum="CallMode">
  47. The method will be called on this [Object].
  48. </constant>
  49. <constant name="CALL_MODE_NODE_PATH" value="1" enum="CallMode">
  50. The method will be called on the given [Node] in the scene tree.
  51. </constant>
  52. <constant name="CALL_MODE_INSTANCE" value="2" enum="CallMode">
  53. The method will be called on an instanced node with the given type and script.
  54. </constant>
  55. <constant name="CALL_MODE_BASIC_TYPE" value="3" enum="CallMode">
  56. The method will be called on a GDScript basic type (e.g. [Vector2]).
  57. </constant>
  58. <constant name="CALL_MODE_SINGLETON" value="4" enum="CallMode">
  59. The method will be called on a singleton.
  60. </constant>
  61. <constant name="RPC_DISABLED" value="0" enum="RPCCallMode">
  62. The method will be called locally.
  63. </constant>
  64. <constant name="RPC_RELIABLE" value="1" enum="RPCCallMode">
  65. The method will be called remotely.
  66. </constant>
  67. <constant name="RPC_UNRELIABLE" value="2" enum="RPCCallMode">
  68. The method will be called remotely using an unreliable protocol.
  69. </constant>
  70. <constant name="RPC_RELIABLE_TO_ID" value="3" enum="RPCCallMode">
  71. The method will be called remotely for the given peer.
  72. </constant>
  73. <constant name="RPC_UNRELIABLE_TO_ID" value="4" enum="RPCCallMode">
  74. The method will be called remotely for the given peer, using an unreliable protocol.
  75. </constant>
  76. </constants>
  77. </class>