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