class_visualscriptnode.rst 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the VisualScriptNode.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualScriptNode:
  6. VisualScriptNode
  7. ================
  8. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **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>`
  10. A node which is part of a :ref:`VisualScript<class_VisualScript>`.
  11. Description
  12. -----------
  13. 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>`.
  14. Methods
  15. -------
  16. +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`Variant<class_Variant>` | :ref:`get_default_input_value<class_VisualScriptNode_method_get_default_input_value>` **(** :ref:`int<class_int>` port_idx **)** |const| |
  18. +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`VisualScript<class_VisualScript>` | :ref:`get_visual_script<class_VisualScriptNode_method_get_visual_script>` **(** **)** |const| |
  20. +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`ports_changed_notify<class_VisualScriptNode_method_ports_changed_notify>` **(** **)** |
  22. +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`set_default_input_value<class_VisualScriptNode_method_set_default_input_value>` **(** :ref:`int<class_int>` port_idx, :ref:`Variant<class_Variant>` value **)** |
  24. +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. Signals
  26. -------
  27. .. _class_VisualScriptNode_signal_ports_changed:
  28. - **ports_changed** **(** **)**
  29. Emitted when the available input/output ports are changed.
  30. Method Descriptions
  31. -------------------
  32. .. _class_VisualScriptNode_method_get_default_input_value:
  33. - :ref:`Variant<class_Variant>` **get_default_input_value** **(** :ref:`int<class_int>` port_idx **)** |const|
  34. Returns the default value of a given port. The default value is used when nothing is connected to the port.
  35. ----
  36. .. _class_VisualScriptNode_method_get_visual_script:
  37. - :ref:`VisualScript<class_VisualScript>` **get_visual_script** **(** **)** |const|
  38. Returns the :ref:`VisualScript<class_VisualScript>` instance the node is bound to.
  39. ----
  40. .. _class_VisualScriptNode_method_ports_changed_notify:
  41. - void **ports_changed_notify** **(** **)**
  42. Notify that the node's ports have changed. Usually used in conjunction with :ref:`VisualScriptCustomNode<class_VisualScriptCustomNode>` .
  43. ----
  44. .. _class_VisualScriptNode_method_set_default_input_value:
  45. - void **set_default_input_value** **(** :ref:`int<class_int>` port_idx, :ref:`Variant<class_Variant>` value **)**
  46. Change the default value of a given port.
  47. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  48. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  49. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`