:github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the VisualScriptPropertySet.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_VisualScriptPropertySet: VisualScriptPropertySet ======================= **Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` A Visual Script node that sets a property of an :ref:`Object`. Description ----------- ``VisualScriptPropertySet`` can set the value of any property from the current object or other objects. Properties ---------- +--------------------------------------------------------+------------------------------------------------------------------------+--------------+ | :ref:`AssignOp` | :ref:`assign_op` | ``0`` | +--------------------------------------------------------+------------------------------------------------------------------------+--------------+ | :ref:`String` | :ref:`base_script` | | +--------------------------------------------------------+------------------------------------------------------------------------+--------------+ | :ref:`String` | :ref:`base_type` | ``"Object"`` | +--------------------------------------------------------+------------------------------------------------------------------------+--------------+ | :ref:`Variant.Type` | :ref:`basic_type` | | +--------------------------------------------------------+------------------------------------------------------------------------+--------------+ | :ref:`String` | :ref:`index` | | +--------------------------------------------------------+------------------------------------------------------------------------+--------------+ | :ref:`NodePath` | :ref:`node_path` | | +--------------------------------------------------------+------------------------------------------------------------------------+--------------+ | :ref:`String` | :ref:`property` | ``""`` | +--------------------------------------------------------+------------------------------------------------------------------------+--------------+ | :ref:`CallMode` | :ref:`set_mode` | ``0`` | +--------------------------------------------------------+------------------------------------------------------------------------+--------------+ Enumerations ------------ .. _enum_VisualScriptPropertySet_CallMode: .. _class_VisualScriptPropertySet_constant_CALL_MODE_SELF: .. _class_VisualScriptPropertySet_constant_CALL_MODE_NODE_PATH: .. _class_VisualScriptPropertySet_constant_CALL_MODE_INSTANCE: .. _class_VisualScriptPropertySet_constant_CALL_MODE_BASIC_TYPE: enum **CallMode**: - **CALL_MODE_SELF** = **0** --- The property will be set on this :ref:`Object`. - **CALL_MODE_NODE_PATH** = **1** --- The property will be set on the given :ref:`Node` in the scene tree. - **CALL_MODE_INSTANCE** = **2** --- The property will be set on an instanced node with the given type and script. - **CALL_MODE_BASIC_TYPE** = **3** --- The property will be set on a GDScript basic type (e.g. :ref:`Vector2`). ---- .. _enum_VisualScriptPropertySet_AssignOp: .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_NONE: .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_ADD: .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_SUB: .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_MUL: .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_DIV: .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_MOD: .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_SHIFT_LEFT: .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_SHIFT_RIGHT: .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_BIT_AND: .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_BIT_OR: .. _class_VisualScriptPropertySet_constant_ASSIGN_OP_BIT_XOR: enum **AssignOp**: - **ASSIGN_OP_NONE** = **0** --- The property will be assigned regularly. - **ASSIGN_OP_ADD** = **1** --- The value will be added to the property. Equivalent of doing ``+=``. - **ASSIGN_OP_SUB** = **2** --- The value will be subtracted from the property. Equivalent of doing ``-=``. - **ASSIGN_OP_MUL** = **3** --- The property will be multiplied by the value. Equivalent of doing ``*=``. - **ASSIGN_OP_DIV** = **4** --- The property will be divided by the value. Equivalent of doing ``/=``. - **ASSIGN_OP_MOD** = **5** --- A modulo operation will be performed on the property and the value. Equivalent of doing ``%=``. - **ASSIGN_OP_SHIFT_LEFT** = **6** --- The property will be binarly shifted to the left by the given value. Equivalent of doing ``<<``. - **ASSIGN_OP_SHIFT_RIGHT** = **7** --- The property will be binarly shifted to the right by the given value. Equivalent of doing ``>>``. - **ASSIGN_OP_BIT_AND** = **8** --- A binary ``AND`` operation will be performed on the property. Equivalent of doing ``&=``. - **ASSIGN_OP_BIT_OR** = **9** --- A binary ``OR`` operation will be performed on the property. Equivalent of doing ``|=``. - **ASSIGN_OP_BIT_XOR** = **10** --- A binary ``XOR`` operation will be performed on the property. Equivalent of doing ``^=``. Property Descriptions --------------------- .. _class_VisualScriptPropertySet_property_assign_op: - :ref:`AssignOp` **assign_op** +-----------+----------------------+ | *Default* | ``0`` | +-----------+----------------------+ | *Setter* | set_assign_op(value) | +-----------+----------------------+ | *Getter* | get_assign_op() | +-----------+----------------------+ The additional operation to perform when assigning. See :ref:`AssignOp` for options. ---- .. _class_VisualScriptPropertySet_property_base_script: - :ref:`String` **base_script** +----------+------------------------+ | *Setter* | set_base_script(value) | +----------+------------------------+ | *Getter* | get_base_script() | +----------+------------------------+ The script to be used when :ref:`set_mode` is set to :ref:`CALL_MODE_INSTANCE`. ---- .. _class_VisualScriptPropertySet_property_base_type: - :ref:`String` **base_type** +-----------+----------------------+ | *Default* | ``"Object"`` | +-----------+----------------------+ | *Setter* | set_base_type(value) | +-----------+----------------------+ | *Getter* | get_base_type() | +-----------+----------------------+ The base type to be used when :ref:`set_mode` is set to :ref:`CALL_MODE_INSTANCE`. ---- .. _class_VisualScriptPropertySet_property_basic_type: - :ref:`Variant.Type` **basic_type** +----------+-----------------------+ | *Setter* | set_basic_type(value) | +----------+-----------------------+ | *Getter* | get_basic_type() | +----------+-----------------------+ The type to be used when :ref:`set_mode` is set to :ref:`CALL_MODE_BASIC_TYPE`. ---- .. _class_VisualScriptPropertySet_property_index: - :ref:`String` **index** +----------+------------------+ | *Setter* | set_index(value) | +----------+------------------+ | *Getter* | get_index() | +----------+------------------+ The indexed name of the property to set. See :ref:`Object.set_indexed` for details. ---- .. _class_VisualScriptPropertySet_property_node_path: - :ref:`NodePath` **node_path** +----------+----------------------+ | *Setter* | set_base_path(value) | +----------+----------------------+ | *Getter* | get_base_path() | +----------+----------------------+ The node path to use when :ref:`set_mode` is set to :ref:`CALL_MODE_NODE_PATH`. ---- .. _class_VisualScriptPropertySet_property_property: - :ref:`String` **property** +-----------+---------------------+ | *Default* | ``""`` | +-----------+---------------------+ | *Setter* | set_property(value) | +-----------+---------------------+ | *Getter* | get_property() | +-----------+---------------------+ The name of the property to set. Changing this will clear :ref:`index`. ---- .. _class_VisualScriptPropertySet_property_set_mode: - :ref:`CallMode` **set_mode** +-----------+----------------------+ | *Default* | ``0`` | +-----------+----------------------+ | *Setter* | set_call_mode(value) | +-----------+----------------------+ | *Getter* | get_call_mode() | +-----------+----------------------+ ``set_mode`` determines the target object on which the property will be set. See :ref:`CallMode` for options. .. |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.)`