:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/modules/visual_script/doc_classes/VisualScriptYield.xml. .. _class_VisualScriptYield: VisualScriptYield ================= **Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` A Visual Script node used to pause a function execution. Description ----------- ``VisualScriptYield`` will pause the function call and return :ref:`VisualScriptFunctionState`, which can be used to resume the function. Properties ---------- +----------------------------------------------------+--------------------------------------------------------------+-------+ | :ref:`YieldMode` | :ref:`mode` | ``1`` | +----------------------------------------------------+--------------------------------------------------------------+-------+ | :ref:`float` | :ref:`wait_time` | | +----------------------------------------------------+--------------------------------------------------------------+-------+ Enumerations ------------ .. _enum_VisualScriptYield_YieldMode: .. _class_VisualScriptYield_constant_YIELD_FRAME: .. _class_VisualScriptYield_constant_YIELD_PHYSICS_FRAME: .. _class_VisualScriptYield_constant_YIELD_WAIT: enum **YieldMode**: - **YIELD_FRAME** = **1** --- Yields during an idle frame. - **YIELD_PHYSICS_FRAME** = **2** --- Yields during a physics frame. - **YIELD_WAIT** = **3** --- Yields a function and waits the given time. Property Descriptions --------------------- .. _class_VisualScriptYield_property_mode: - :ref:`YieldMode` **mode** +-----------+-----------------------+ | *Default* | ``1`` | +-----------+-----------------------+ | *Setter* | set_yield_mode(value) | +-----------+-----------------------+ | *Getter* | get_yield_mode() | +-----------+-----------------------+ The mode to use for yielding. See :ref:`YieldMode` for available options. ---- .. _class_VisualScriptYield_property_wait_time: - :ref:`float` **wait_time** +----------+----------------------+ | *Setter* | set_wait_time(value) | +----------+----------------------+ | *Getter* | get_wait_time() | +----------+----------------------+ The time to wait when :ref:`mode` is set to :ref:`YIELD_WAIT`. .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`