VisualScriptFunctionCall

Inherits: VisualScriptNode < Resource < Reference < 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

String

base_script

String

base_type

"Object"

Variant.Type

basic_type

CallMode

call_mode

0

String

function

""

NodePath

node_path

RPCCallMode

rpc_call_mode

0

String

singleton

int

use_default_args

bool

validate

true


Enumerations

enum CallMode:

CallMode CALL_MODE_SELF = 0

The method will be called on this Object.

CallMode CALL_MODE_NODE_PATH = 1

The method will be called on the given Node in the scene tree.

CallMode CALL_MODE_INSTANCE = 2

The method will be called on an instanced node with the given type and script.

CallMode CALL_MODE_BASIC_TYPE = 3

The method will be called on a GDScript basic type (e.g. Vector2).

CallMode CALL_MODE_SINGLETON = 4

The method will be called on a singleton.


enum RPCCallMode:

RPCCallMode RPC_DISABLED = 0

The method will be called locally.

RPCCallMode RPC_RELIABLE = 1

The method will be called remotely.

RPCCallMode RPC_UNRELIABLE = 2

The method will be called remotely using an unreliable protocol.

RPCCallMode RPC_RELIABLE_TO_ID = 3

The method will be called remotely for the given peer.

RPCCallMode RPC_UNRELIABLE_TO_ID = 4

The method will be called remotely for the given peer, using an unreliable protocol.


Property Descriptions

String base_script

  • void set_base_script ( String value )

  • String get_base_script ( )

The script to be used when call_mode is set to CALL_MODE_INSTANCE.


String base_type = "Object"

  • void set_base_type ( String value )

  • String get_base_type ( )

The base type to be used when call_mode is set to CALL_MODE_INSTANCE.


Variant.Type basic_type

The type to be used when call_mode is set to CALL_MODE_BASIC_TYPE.


CallMode call_mode = 0

call_mode determines the target object on which the method will be called. See CallMode for options.


String function = ""

  • void set_function ( String value )

  • String get_function ( )

The name of the function to be called.


NodePath node_path

The node path to use when call_mode is set to CALL_MODE_NODE_PATH.


RPCCallMode rpc_call_mode = 0

The mode for RPC calls. See Node.rpc for more details and RPCCallMode for available options.


String singleton

  • void set_singleton ( String value )

  • String get_singleton ( )

The singleton to call the method on. Used when call_mode is set to CALL_MODE_SINGLETON.


int use_default_args

  • void set_use_default_args ( int value )

  • 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.


bool validate = true

  • void set_validate ( bool value )

  • bool get_validate ( )

If false, call errors (e.g. wrong number of arguments) will be ignored.