virtualx-engine-docs/_sources/classes/class_visualscriptnode.rst.txt
2024-10-23 09:41:33 -07:00

117 lines
7.3 KiB
ReStructuredText

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/3.6/modules/visual_script/doc_classes/VisualScriptNode.xml.
.. _class_VisualScriptNode:
VisualScriptNode
================
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
**Inherited By:** :ref:`VisualScriptBasicTypeConstant<class_VisualScriptBasicTypeConstant>`, :ref:`VisualScriptBuiltinFunc<class_VisualScriptBuiltinFunc>`, :ref:`VisualScriptClassConstant<class_VisualScriptClassConstant>`, :ref:`VisualScriptComment<class_VisualScriptComment>`, :ref:`VisualScriptCondition<class_VisualScriptCondition>`, :ref:`VisualScriptConstant<class_VisualScriptConstant>`, :ref:`VisualScriptConstructor<class_VisualScriptConstructor>`, :ref:`VisualScriptCustomNode<class_VisualScriptCustomNode>`, :ref:`VisualScriptDeconstruct<class_VisualScriptDeconstruct>`, :ref:`VisualScriptEmitSignal<class_VisualScriptEmitSignal>`, :ref:`VisualScriptEngineSingleton<class_VisualScriptEngineSingleton>`, :ref:`VisualScriptExpression<class_VisualScriptExpression>`, :ref:`VisualScriptFunction<class_VisualScriptFunction>`, :ref:`VisualScriptFunctionCall<class_VisualScriptFunctionCall>`, :ref:`VisualScriptGlobalConstant<class_VisualScriptGlobalConstant>`, :ref:`VisualScriptIndexGet<class_VisualScriptIndexGet>`, :ref:`VisualScriptIndexSet<class_VisualScriptIndexSet>`, :ref:`VisualScriptInputAction<class_VisualScriptInputAction>`, :ref:`VisualScriptIterator<class_VisualScriptIterator>`, :ref:`VisualScriptLists<class_VisualScriptLists>`, :ref:`VisualScriptLocalVar<class_VisualScriptLocalVar>`, :ref:`VisualScriptLocalVarSet<class_VisualScriptLocalVarSet>`, :ref:`VisualScriptMathConstant<class_VisualScriptMathConstant>`, :ref:`VisualScriptOperator<class_VisualScriptOperator>`, :ref:`VisualScriptPreload<class_VisualScriptPreload>`, :ref:`VisualScriptPropertyGet<class_VisualScriptPropertyGet>`, :ref:`VisualScriptPropertySet<class_VisualScriptPropertySet>`, :ref:`VisualScriptResourcePath<class_VisualScriptResourcePath>`, :ref:`VisualScriptReturn<class_VisualScriptReturn>`, :ref:`VisualScriptSceneNode<class_VisualScriptSceneNode>`, :ref:`VisualScriptSceneTree<class_VisualScriptSceneTree>`, :ref:`VisualScriptSelect<class_VisualScriptSelect>`, :ref:`VisualScriptSelf<class_VisualScriptSelf>`, :ref:`VisualScriptSequence<class_VisualScriptSequence>`, :ref:`VisualScriptSubCall<class_VisualScriptSubCall>`, :ref:`VisualScriptSwitch<class_VisualScriptSwitch>`, :ref:`VisualScriptTypeCast<class_VisualScriptTypeCast>`, :ref:`VisualScriptVariableGet<class_VisualScriptVariableGet>`, :ref:`VisualScriptVariableSet<class_VisualScriptVariableSet>`, :ref:`VisualScriptWhile<class_VisualScriptWhile>`, :ref:`VisualScriptYield<class_VisualScriptYield>`, :ref:`VisualScriptYieldSignal<class_VisualScriptYieldSignal>`
A node which is part of a :ref:`VisualScript<class_VisualScript>`.
.. rst-class:: classref-introduction-group
Description
-----------
A node which is part of a :ref:`VisualScript<class_VisualScript>`. Not to be confused with :ref:`Node<class_Node>`, which is a part of a :ref:`SceneTree<class_SceneTree>`.
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`get_default_input_value<class_VisualScriptNode_method_get_default_input_value>` **(** :ref:`int<class_int>` port_idx **)** |const| |
+-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`VisualScript<class_VisualScript>` | :ref:`get_visual_script<class_VisualScriptNode_method_get_visual_script>` **(** **)** |const| |
+-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`ports_changed_notify<class_VisualScriptNode_method_ports_changed_notify>` **(** **)** |
+-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_default_input_value<class_VisualScriptNode_method_set_default_input_value>` **(** :ref:`int<class_int>` port_idx, :ref:`Variant<class_Variant>` value **)** |
+-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Signals
-------
.. _class_VisualScriptNode_signal_ports_changed:
.. rst-class:: classref-signal
**ports_changed** **(** **)**
Emitted when the available input/output ports are changed.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_VisualScriptNode_method_get_default_input_value:
.. rst-class:: classref-method
:ref:`Variant<class_Variant>` **get_default_input_value** **(** :ref:`int<class_int>` port_idx **)** |const|
Returns the default value of a given port. The default value is used when nothing is connected to the port.
.. rst-class:: classref-item-separator
----
.. _class_VisualScriptNode_method_get_visual_script:
.. rst-class:: classref-method
:ref:`VisualScript<class_VisualScript>` **get_visual_script** **(** **)** |const|
Returns the :ref:`VisualScript<class_VisualScript>` instance the node is bound to.
.. rst-class:: classref-item-separator
----
.. _class_VisualScriptNode_method_ports_changed_notify:
.. rst-class:: classref-method
void **ports_changed_notify** **(** **)**
Notify that the node's ports have changed. Usually used in conjunction with :ref:`VisualScriptCustomNode<class_VisualScriptCustomNode>` .
.. rst-class:: classref-item-separator
----
.. _class_VisualScriptNode_method_set_default_input_value:
.. rst-class:: classref-method
void **set_default_input_value** **(** :ref:`int<class_int>` port_idx, :ref:`Variant<class_Variant>` value **)**
Change the default value of a given port.
.. |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.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`