mirror of
https://github.com/Relintai/pandemonium_engine_docs.git
synced 2025-01-23 15:17:21 +01:00
471 lines
38 KiB
ReStructuredText
471 lines
38 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/3.5/modules/visual_script/doc_classes/VisualScript.xml.
|
|
|
|
.. _class_VisualScript:
|
|
|
|
VisualScript
|
|
============
|
|
|
|
**Inherits:** :ref:`Script<class_Script>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
|
|
|
A script implemented in the Visual Script programming environment.
|
|
|
|
Description
|
|
-----------
|
|
|
|
A script implemented in the Visual Script programming environment. The script extends the functionality of all objects that instance it.
|
|
|
|
\ :ref:`Object.set_script<class_Object_method_set_script>` extends an existing object, if that object's class matches one of the script's base classes.
|
|
|
|
You are most likely to use this class via the Visual Script editor or when writing plugins for it.
|
|
|
|
Tutorials
|
|
---------
|
|
|
|
- :doc:`../tutorials/scripting/visual_script/index`
|
|
|
|
Methods
|
|
-------
|
|
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_custom_signal<class_VisualScript_method_add_custom_signal>` **(** :ref:`String<class_String>` name **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_function<class_VisualScript_method_add_function>` **(** :ref:`String<class_String>` name **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_node<class_VisualScript_method_add_node>` **(** :ref:`String<class_String>` func, :ref:`int<class_int>` id, :ref:`VisualScriptNode<class_VisualScriptNode>` node, :ref:`Vector2<class_Vector2>` position=Vector2( 0, 0 ) **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_variable<class_VisualScript_method_add_variable>` **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` default_value=null, :ref:`bool<class_bool>` export=false **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`custom_signal_add_argument<class_VisualScript_method_custom_signal_add_argument>` **(** :ref:`String<class_String>` name, :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` type, :ref:`String<class_String>` argname, :ref:`int<class_int>` index=-1 **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`custom_signal_get_argument_count<class_VisualScript_method_custom_signal_get_argument_count>` **(** :ref:`String<class_String>` name **)** |const| |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`String<class_String>` | :ref:`custom_signal_get_argument_name<class_VisualScript_method_custom_signal_get_argument_name>` **(** :ref:`String<class_String>` name, :ref:`int<class_int>` argidx **)** |const| |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`custom_signal_get_argument_type<class_VisualScript_method_custom_signal_get_argument_type>` **(** :ref:`String<class_String>` name, :ref:`int<class_int>` argidx **)** |const| |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`custom_signal_remove_argument<class_VisualScript_method_custom_signal_remove_argument>` **(** :ref:`String<class_String>` name, :ref:`int<class_int>` argidx **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`custom_signal_set_argument_name<class_VisualScript_method_custom_signal_set_argument_name>` **(** :ref:`String<class_String>` name, :ref:`int<class_int>` argidx, :ref:`String<class_String>` argname **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`custom_signal_set_argument_type<class_VisualScript_method_custom_signal_set_argument_type>` **(** :ref:`String<class_String>` name, :ref:`int<class_int>` argidx, :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` type **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`custom_signal_swap_argument<class_VisualScript_method_custom_signal_swap_argument>` **(** :ref:`String<class_String>` name, :ref:`int<class_int>` argidx, :ref:`int<class_int>` withidx **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`data_connect<class_VisualScript_method_data_connect>` **(** :ref:`String<class_String>` func, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_port, :ref:`int<class_int>` to_node, :ref:`int<class_int>` to_port **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`data_disconnect<class_VisualScript_method_data_disconnect>` **(** :ref:`String<class_String>` func, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_port, :ref:`int<class_int>` to_node, :ref:`int<class_int>` to_port **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_function_node_id<class_VisualScript_method_get_function_node_id>` **(** :ref:`String<class_String>` name **)** |const| |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`get_function_scroll<class_VisualScript_method_get_function_scroll>` **(** :ref:`String<class_String>` name **)** |const| |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`VisualScriptNode<class_VisualScriptNode>` | :ref:`get_node<class_VisualScript_method_get_node>` **(** :ref:`String<class_String>` func, :ref:`int<class_int>` id **)** |const| |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`get_node_position<class_VisualScript_method_get_node_position>` **(** :ref:`String<class_String>` func, :ref:`int<class_int>` id **)** |const| |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Variant<class_Variant>` | :ref:`get_variable_default_value<class_VisualScript_method_get_variable_default_value>` **(** :ref:`String<class_String>` name **)** |const| |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`get_variable_export<class_VisualScript_method_get_variable_export>` **(** :ref:`String<class_String>` name **)** |const| |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Dictionary<class_Dictionary>` | :ref:`get_variable_info<class_VisualScript_method_get_variable_info>` **(** :ref:`String<class_String>` name **)** |const| |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`has_custom_signal<class_VisualScript_method_has_custom_signal>` **(** :ref:`String<class_String>` name **)** |const| |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`has_data_connection<class_VisualScript_method_has_data_connection>` **(** :ref:`String<class_String>` func, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_port, :ref:`int<class_int>` to_node, :ref:`int<class_int>` to_port **)** |const| |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`has_function<class_VisualScript_method_has_function>` **(** :ref:`String<class_String>` name **)** |const| |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`has_node<class_VisualScript_method_has_node>` **(** :ref:`String<class_String>` func, :ref:`int<class_int>` id **)** |const| |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`has_sequence_connection<class_VisualScript_method_has_sequence_connection>` **(** :ref:`String<class_String>` func, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_output, :ref:`int<class_int>` to_node **)** |const| |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`has_variable<class_VisualScript_method_has_variable>` **(** :ref:`String<class_String>` name **)** |const| |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`remove_custom_signal<class_VisualScript_method_remove_custom_signal>` **(** :ref:`String<class_String>` name **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`remove_function<class_VisualScript_method_remove_function>` **(** :ref:`String<class_String>` name **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`remove_node<class_VisualScript_method_remove_node>` **(** :ref:`String<class_String>` func, :ref:`int<class_int>` id **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`remove_variable<class_VisualScript_method_remove_variable>` **(** :ref:`String<class_String>` name **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`rename_custom_signal<class_VisualScript_method_rename_custom_signal>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` new_name **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`rename_function<class_VisualScript_method_rename_function>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` new_name **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`rename_variable<class_VisualScript_method_rename_variable>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` new_name **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`sequence_connect<class_VisualScript_method_sequence_connect>` **(** :ref:`String<class_String>` func, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_output, :ref:`int<class_int>` to_node **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`sequence_disconnect<class_VisualScript_method_sequence_disconnect>` **(** :ref:`String<class_String>` func, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_output, :ref:`int<class_int>` to_node **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_function_scroll<class_VisualScript_method_set_function_scroll>` **(** :ref:`String<class_String>` name, :ref:`Vector2<class_Vector2>` ofs **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_instance_base_type<class_VisualScript_method_set_instance_base_type>` **(** :ref:`String<class_String>` type **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_node_position<class_VisualScript_method_set_node_position>` **(** :ref:`String<class_String>` func, :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` position **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_variable_default_value<class_VisualScript_method_set_variable_default_value>` **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` value **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_variable_export<class_VisualScript_method_set_variable_export>` **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` enable **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_variable_info<class_VisualScript_method_set_variable_info>` **(** :ref:`String<class_String>` name, :ref:`Dictionary<class_Dictionary>` value **)** |
|
|
+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Signals
|
|
-------
|
|
|
|
.. _class_VisualScript_signal_node_ports_changed:
|
|
|
|
- **node_ports_changed** **(** :ref:`String<class_String>` function, :ref:`int<class_int>` id **)**
|
|
|
|
Emitted when the ports of a node are changed.
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_VisualScript_method_add_custom_signal:
|
|
|
|
- void **add_custom_signal** **(** :ref:`String<class_String>` name **)**
|
|
|
|
Add a custom signal with the specified name to the VisualScript.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_add_function:
|
|
|
|
- void **add_function** **(** :ref:`String<class_String>` name **)**
|
|
|
|
Add a function with the specified name to the VisualScript.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_add_node:
|
|
|
|
- void **add_node** **(** :ref:`String<class_String>` func, :ref:`int<class_int>` id, :ref:`VisualScriptNode<class_VisualScriptNode>` node, :ref:`Vector2<class_Vector2>` position=Vector2( 0, 0 ) **)**
|
|
|
|
Add a node to a function of the VisualScript.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_add_variable:
|
|
|
|
- void **add_variable** **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` default_value=null, :ref:`bool<class_bool>` export=false **)**
|
|
|
|
Add a variable to the VisualScript, optionally giving it a default value or marking it as exported.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_custom_signal_add_argument:
|
|
|
|
- void **custom_signal_add_argument** **(** :ref:`String<class_String>` name, :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` type, :ref:`String<class_String>` argname, :ref:`int<class_int>` index=-1 **)**
|
|
|
|
Add an argument to a custom signal added with :ref:`add_custom_signal<class_VisualScript_method_add_custom_signal>`.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_custom_signal_get_argument_count:
|
|
|
|
- :ref:`int<class_int>` **custom_signal_get_argument_count** **(** :ref:`String<class_String>` name **)** |const|
|
|
|
|
Get the count of a custom signal's arguments.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_custom_signal_get_argument_name:
|
|
|
|
- :ref:`String<class_String>` **custom_signal_get_argument_name** **(** :ref:`String<class_String>` name, :ref:`int<class_int>` argidx **)** |const|
|
|
|
|
Get the name of a custom signal's argument.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_custom_signal_get_argument_type:
|
|
|
|
- :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **custom_signal_get_argument_type** **(** :ref:`String<class_String>` name, :ref:`int<class_int>` argidx **)** |const|
|
|
|
|
Get the type of a custom signal's argument.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_custom_signal_remove_argument:
|
|
|
|
- void **custom_signal_remove_argument** **(** :ref:`String<class_String>` name, :ref:`int<class_int>` argidx **)**
|
|
|
|
Remove a specific custom signal's argument.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_custom_signal_set_argument_name:
|
|
|
|
- void **custom_signal_set_argument_name** **(** :ref:`String<class_String>` name, :ref:`int<class_int>` argidx, :ref:`String<class_String>` argname **)**
|
|
|
|
Rename a custom signal's argument.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_custom_signal_set_argument_type:
|
|
|
|
- void **custom_signal_set_argument_type** **(** :ref:`String<class_String>` name, :ref:`int<class_int>` argidx, :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` type **)**
|
|
|
|
Change the type of a custom signal's argument.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_custom_signal_swap_argument:
|
|
|
|
- void **custom_signal_swap_argument** **(** :ref:`String<class_String>` name, :ref:`int<class_int>` argidx, :ref:`int<class_int>` withidx **)**
|
|
|
|
Swap two of the arguments of a custom signal.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_data_connect:
|
|
|
|
- void **data_connect** **(** :ref:`String<class_String>` func, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_port, :ref:`int<class_int>` to_node, :ref:`int<class_int>` to_port **)**
|
|
|
|
Connect two data ports. The value of ``from_node``'s ``from_port`` would be fed into ``to_node``'s ``to_port``.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_data_disconnect:
|
|
|
|
- void **data_disconnect** **(** :ref:`String<class_String>` func, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_port, :ref:`int<class_int>` to_node, :ref:`int<class_int>` to_port **)**
|
|
|
|
Disconnect two data ports previously connected with :ref:`data_connect<class_VisualScript_method_data_connect>`.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_get_function_node_id:
|
|
|
|
- :ref:`int<class_int>` **get_function_node_id** **(** :ref:`String<class_String>` name **)** |const|
|
|
|
|
Returns the id of a function's entry point node.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_get_function_scroll:
|
|
|
|
- :ref:`Vector2<class_Vector2>` **get_function_scroll** **(** :ref:`String<class_String>` name **)** |const|
|
|
|
|
Returns the position of the center of the screen for a given function.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_get_node:
|
|
|
|
- :ref:`VisualScriptNode<class_VisualScriptNode>` **get_node** **(** :ref:`String<class_String>` func, :ref:`int<class_int>` id **)** |const|
|
|
|
|
Returns a node given its id and its function.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_get_node_position:
|
|
|
|
- :ref:`Vector2<class_Vector2>` **get_node_position** **(** :ref:`String<class_String>` func, :ref:`int<class_int>` id **)** |const|
|
|
|
|
Returns a node's position in pixels.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_get_variable_default_value:
|
|
|
|
- :ref:`Variant<class_Variant>` **get_variable_default_value** **(** :ref:`String<class_String>` name **)** |const|
|
|
|
|
Returns the default (initial) value of a variable.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_get_variable_export:
|
|
|
|
- :ref:`bool<class_bool>` **get_variable_export** **(** :ref:`String<class_String>` name **)** |const|
|
|
|
|
Returns whether a variable is exported.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_get_variable_info:
|
|
|
|
- :ref:`Dictionary<class_Dictionary>` **get_variable_info** **(** :ref:`String<class_String>` name **)** |const|
|
|
|
|
Returns the information for a given variable as a dictionary. The information includes its name, type, hint and usage.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_has_custom_signal:
|
|
|
|
- :ref:`bool<class_bool>` **has_custom_signal** **(** :ref:`String<class_String>` name **)** |const|
|
|
|
|
Returns whether a signal exists with the specified name.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_has_data_connection:
|
|
|
|
- :ref:`bool<class_bool>` **has_data_connection** **(** :ref:`String<class_String>` func, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_port, :ref:`int<class_int>` to_node, :ref:`int<class_int>` to_port **)** |const|
|
|
|
|
Returns whether the specified data ports are connected.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_has_function:
|
|
|
|
- :ref:`bool<class_bool>` **has_function** **(** :ref:`String<class_String>` name **)** |const|
|
|
|
|
Returns whether a function exists with the specified name.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_has_node:
|
|
|
|
- :ref:`bool<class_bool>` **has_node** **(** :ref:`String<class_String>` func, :ref:`int<class_int>` id **)** |const|
|
|
|
|
Returns whether a node exists with the given id.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_has_sequence_connection:
|
|
|
|
- :ref:`bool<class_bool>` **has_sequence_connection** **(** :ref:`String<class_String>` func, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_output, :ref:`int<class_int>` to_node **)** |const|
|
|
|
|
Returns whether the specified sequence ports are connected.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_has_variable:
|
|
|
|
- :ref:`bool<class_bool>` **has_variable** **(** :ref:`String<class_String>` name **)** |const|
|
|
|
|
Returns whether a variable exists with the specified name.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_remove_custom_signal:
|
|
|
|
- void **remove_custom_signal** **(** :ref:`String<class_String>` name **)**
|
|
|
|
Remove a custom signal with the given name.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_remove_function:
|
|
|
|
- void **remove_function** **(** :ref:`String<class_String>` name **)**
|
|
|
|
Remove a specific function and its nodes from the script.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_remove_node:
|
|
|
|
- void **remove_node** **(** :ref:`String<class_String>` func, :ref:`int<class_int>` id **)**
|
|
|
|
Remove a specific node.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_remove_variable:
|
|
|
|
- void **remove_variable** **(** :ref:`String<class_String>` name **)**
|
|
|
|
Remove a variable with the given name.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_rename_custom_signal:
|
|
|
|
- void **rename_custom_signal** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` new_name **)**
|
|
|
|
Change the name of a custom signal.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_rename_function:
|
|
|
|
- void **rename_function** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` new_name **)**
|
|
|
|
Change the name of a function.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_rename_variable:
|
|
|
|
- void **rename_variable** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` new_name **)**
|
|
|
|
Change the name of a variable.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_sequence_connect:
|
|
|
|
- void **sequence_connect** **(** :ref:`String<class_String>` func, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_output, :ref:`int<class_int>` to_node **)**
|
|
|
|
Connect two sequence ports. The execution will flow from of ``from_node``'s ``from_output`` into ``to_node``.
|
|
|
|
Unlike :ref:`data_connect<class_VisualScript_method_data_connect>`, there isn't a ``to_port``, since the target node can have only one sequence port.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_sequence_disconnect:
|
|
|
|
- void **sequence_disconnect** **(** :ref:`String<class_String>` func, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_output, :ref:`int<class_int>` to_node **)**
|
|
|
|
Disconnect two sequence ports previously connected with :ref:`sequence_connect<class_VisualScript_method_sequence_connect>`.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_set_function_scroll:
|
|
|
|
- void **set_function_scroll** **(** :ref:`String<class_String>` name, :ref:`Vector2<class_Vector2>` ofs **)**
|
|
|
|
Position the center of the screen for a function.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_set_instance_base_type:
|
|
|
|
- void **set_instance_base_type** **(** :ref:`String<class_String>` type **)**
|
|
|
|
Set the base type of the script.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_set_node_position:
|
|
|
|
- void **set_node_position** **(** :ref:`String<class_String>` func, :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` position **)**
|
|
|
|
Position a node on the screen.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_set_variable_default_value:
|
|
|
|
- void **set_variable_default_value** **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` value **)**
|
|
|
|
Change the default (initial) value of a variable.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_set_variable_export:
|
|
|
|
- void **set_variable_export** **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` enable **)**
|
|
|
|
Change whether a variable is exported.
|
|
|
|
----
|
|
|
|
.. _class_VisualScript_method_set_variable_info:
|
|
|
|
- void **set_variable_info** **(** :ref:`String<class_String>` name, :ref:`Dictionary<class_Dictionary>` value **)**
|
|
|
|
Set a variable's info, using the same format as :ref:`get_variable_info<class_VisualScript_method_get_variable_info>`.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|