VisualScriptFunctionCall

    A Visual Script node for calling a function.

    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.

    enum CallMode:

    • CALL_MODE_SELF = 0 —- The method will be called on this .

    • CALL_MODE_NODE_PATH = 1 —- The method will be called on the given Node in the scene tree.

    • CALL_MODE_INSTANCE = 2 —- The method will be called on an instanced node with the given type and script.


    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.

    Setter

    set_base_script(value)

    Getter

    get_base_script()

    The script to be used when is set to CALL_MODE_INSTANCE.


    Default

    “Object”

    Setter

    set_base_type(value)

    Getter

    get_base_type()

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


    • basic_type

    The type to be used when call_mode is set to .


    Default

    0

    Setter

    set_call_mode(value)

    Getter

    get_call_mode()

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


    Default

    “”

    set_function(value)

    Getter

    get_function()

    The name of the function to be called.


    • node_path

    The node path to use when call_mode is set to .


    Default

    0

    Setter

    set_rpc_call_mode(value)

    Getter

    get_rpc_call_mode()

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


    • singleton

    Setter

    set_singleton(value)

    Getter

    get_singleton()

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


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


    Default

    true

    Setter

    set_validate(value)

    Getter

    get_validate()