godot wait for variable to be true code example
Example 1: how to make code wait gdscript
var t = Timer.new()
t.set_wait_time(3)
t.set_one_shot(true)
self.add_child(t)
t.start()
yield(t, "timeout")
Example 2: how to make code wait gdscript
t.queue_free()