class_visualscriptpropertyget.rst 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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 VisualScriptPropertyGet.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualScriptPropertyGet:
  6. VisualScriptPropertyGet
  7. =======================
  8. **Inherits:** :ref:`VisualScriptNode<class_VisualScriptNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. A Visual Script node returning a value of a property from an :ref:`Object<class_Object>`.
  10. Description
  11. -----------
  12. ``VisualScriptPropertyGet`` can return a value of any property from the current object or other objects.
  13. Properties
  14. ----------
  15. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  16. | :ref:`String<class_String>` | :ref:`base_script<class_VisualScriptPropertyGet_property_base_script>` | |
  17. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  18. | :ref:`String<class_String>` | :ref:`base_type<class_VisualScriptPropertyGet_property_base_type>` | ``"Object"`` |
  19. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  20. | :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`basic_type<class_VisualScriptPropertyGet_property_basic_type>` | |
  21. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  22. | :ref:`String<class_String>` | :ref:`index<class_VisualScriptPropertyGet_property_index>` | |
  23. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  24. | :ref:`NodePath<class_NodePath>` | :ref:`node_path<class_VisualScriptPropertyGet_property_node_path>` | |
  25. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  26. | :ref:`String<class_String>` | :ref:`property<class_VisualScriptPropertyGet_property_property>` | ``""`` |
  27. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  28. | :ref:`CallMode<enum_VisualScriptPropertyGet_CallMode>` | :ref:`set_mode<class_VisualScriptPropertyGet_property_set_mode>` | ``0`` |
  29. +--------------------------------------------------------+------------------------------------------------------------------------+--------------+
  30. Enumerations
  31. ------------
  32. .. _enum_VisualScriptPropertyGet_CallMode:
  33. .. _class_VisualScriptPropertyGet_constant_CALL_MODE_SELF:
  34. .. _class_VisualScriptPropertyGet_constant_CALL_MODE_NODE_PATH:
  35. .. _class_VisualScriptPropertyGet_constant_CALL_MODE_INSTANCE:
  36. .. _class_VisualScriptPropertyGet_constant_CALL_MODE_BASIC_TYPE:
  37. enum **CallMode**:
  38. - **CALL_MODE_SELF** = **0** --- The property will be retrieved from this :ref:`Object<class_Object>`.
  39. - **CALL_MODE_NODE_PATH** = **1** --- The property will be retrieved from the given :ref:`Node<class_Node>` in the scene tree.
  40. - **CALL_MODE_INSTANCE** = **2** --- The property will be retrieved from an instanced node with the given type and script.
  41. - **CALL_MODE_BASIC_TYPE** = **3** --- The property will be retrieved from a GDScript basic type (e.g. :ref:`Vector2<class_Vector2>`).
  42. Property Descriptions
  43. ---------------------
  44. .. _class_VisualScriptPropertyGet_property_base_script:
  45. - :ref:`String<class_String>` **base_script**
  46. +----------+------------------------+
  47. | *Setter* | set_base_script(value) |
  48. +----------+------------------------+
  49. | *Getter* | get_base_script() |
  50. +----------+------------------------+
  51. The script to be used when :ref:`set_mode<class_VisualScriptPropertyGet_property_set_mode>` is set to :ref:`CALL_MODE_INSTANCE<class_VisualScriptPropertyGet_constant_CALL_MODE_INSTANCE>`.
  52. ----
  53. .. _class_VisualScriptPropertyGet_property_base_type:
  54. - :ref:`String<class_String>` **base_type**
  55. +-----------+----------------------+
  56. | *Default* | ``"Object"`` |
  57. +-----------+----------------------+
  58. | *Setter* | set_base_type(value) |
  59. +-----------+----------------------+
  60. | *Getter* | get_base_type() |
  61. +-----------+----------------------+
  62. The base type to be used when :ref:`set_mode<class_VisualScriptPropertyGet_property_set_mode>` is set to :ref:`CALL_MODE_INSTANCE<class_VisualScriptPropertyGet_constant_CALL_MODE_INSTANCE>`.
  63. ----
  64. .. _class_VisualScriptPropertyGet_property_basic_type:
  65. - :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **basic_type**
  66. +----------+-----------------------+
  67. | *Setter* | set_basic_type(value) |
  68. +----------+-----------------------+
  69. | *Getter* | get_basic_type() |
  70. +----------+-----------------------+
  71. The type to be used when :ref:`set_mode<class_VisualScriptPropertyGet_property_set_mode>` is set to :ref:`CALL_MODE_BASIC_TYPE<class_VisualScriptPropertyGet_constant_CALL_MODE_BASIC_TYPE>`.
  72. ----
  73. .. _class_VisualScriptPropertyGet_property_index:
  74. - :ref:`String<class_String>` **index**
  75. +----------+------------------+
  76. | *Setter* | set_index(value) |
  77. +----------+------------------+
  78. | *Getter* | get_index() |
  79. +----------+------------------+
  80. The indexed name of the property to retrieve. See :ref:`Object.get_indexed<class_Object_method_get_indexed>` for details.
  81. ----
  82. .. _class_VisualScriptPropertyGet_property_node_path:
  83. - :ref:`NodePath<class_NodePath>` **node_path**
  84. +----------+----------------------+
  85. | *Setter* | set_base_path(value) |
  86. +----------+----------------------+
  87. | *Getter* | get_base_path() |
  88. +----------+----------------------+
  89. The node path to use when :ref:`set_mode<class_VisualScriptPropertyGet_property_set_mode>` is set to :ref:`CALL_MODE_NODE_PATH<class_VisualScriptPropertyGet_constant_CALL_MODE_NODE_PATH>`.
  90. ----
  91. .. _class_VisualScriptPropertyGet_property_property:
  92. - :ref:`String<class_String>` **property**
  93. +-----------+---------------------+
  94. | *Default* | ``""`` |
  95. +-----------+---------------------+
  96. | *Setter* | set_property(value) |
  97. +-----------+---------------------+
  98. | *Getter* | get_property() |
  99. +-----------+---------------------+
  100. The name of the property to retrieve. Changing this will clear :ref:`index<class_VisualScriptPropertyGet_property_index>`.
  101. ----
  102. .. _class_VisualScriptPropertyGet_property_set_mode:
  103. - :ref:`CallMode<enum_VisualScriptPropertyGet_CallMode>` **set_mode**
  104. +-----------+----------------------+
  105. | *Default* | ``0`` |
  106. +-----------+----------------------+
  107. | *Setter* | set_call_mode(value) |
  108. +-----------+----------------------+
  109. | *Getter* | get_call_mode() |
  110. +-----------+----------------------+
  111. ``set_mode`` determines the target object from which the property will be retrieved. See :ref:`CallMode<enum_VisualScriptPropertyGet_CallMode>` for options.
  112. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  113. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  114. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`