I have code something like this:
node1:
func _ready():
if return_hello_world_after_a_second() == "Hello, World":
print("Success!")
func return_hello_world_after_a_second():
return yield(node2, "signalHello")
node2:
var t = Timer.new()
signal signalHello(text)
func _ready():
t.set_one_shot(true)
t.set_wait_time(1)
t.start()
yield(t, "timeout")
signalHello(text)
but instead it prints something like: [GDScriptFunctionState:1479]
How do i make it print hello, world?
note: also, this is sample code. The code in the game is essentially the same, but for a separate system.