Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Haseb | |
Old Version | Published before Godot 3 was released. |
It seems, when a function that yields (func1) is called inside another function (func2), yield stops only func1, and func2 just goes on without waiting for func1 to resume. How do I stop func2 using yield in func1, or maybe other way?
extends Button
signal resume_func1
func _ready():
func2()
func func2():
print(1)
func1()
print(4)
func func1():
print(2)
yield(self, "resume_func1")
print(3)
func _on_Button_button_down():
emit_signal("resume_func1")
This goes 124(button)3, but what I want is 12(button)34.