Signal isn't emitting despite emitting before?

Godot Version

Godot 4.5.6 stable

Question

Please help! I'm really baffled by this one.Printing out cutscene_action_finished.is_connected() returns ::is_connected, and the signal successfully emits when actionIndex = 0.

Here’s all of the relevant code. Also, I’m kind of new to Godot, so if I’m doing something really stupid then that’s my bad.

What do you expect to happen versus what really happens? Is the problem that "finished" isn’t printing? You could await the function instead of the signal

await cutsceneAction(part1dialogue[i][0]["action"])

print(cutscene_action_finished.is_connected) does not print if the signal is connected to anything it prints the function itself, that’s why you see ::is_connected instead of true or false, but your code posted doesn’t connect to the signal anywhere as await is not related to signal connection.


Make sure to paste code instead of screenshots

Don’t use await

If you expect await cutscene_action_finished to catch the signal when actionIndex is not 0 - it won’t happen because by the time the code reaches that await, the signal was already emitted during the call to cutsceneAction() issued on the previous line. Thus await will miss it and continue to wait forever in vain.

Again, don’t use await, it’ll fry your synapses. Use regular signal handling functions instead.

You can await functions?? How did I just learn about this today-

(thanks for the replies)

Also update your code for the emit:

cutscene_action_finished.emit()

Make sure you don’t get any errors. The way you are doing it is from 3.x, and there’s no way for the editor to check if you’re trying to emit a valid signal.