Sorry I fixed it yesterday but I actually didn't change anything about the signals just cleaned the code around these functions. At the time I created a function connected to this signal and it worked so the name of the signal is right, using print I got this output:
BattleManager.gd
func create_unit():
var unit :Unit = Unit_scn.instance()
unit.connect("action_finished", self, "action_finished_foo")
func action_finished_foo():
printerr("action_finished signal received")
func turn_preparation(unit):
printerr(" - turn_preparation - ")
unit.play_turn(action)
yield(unit,"action_finished")
print("yield resumed")
next_unit_in_queue()
func next_unit_in_queue():
printerr(" - next_unit_in_queue -")
Unit.gd
func play_turn(action):
# I commented everything else just to test the signal
emit_signal("action_finished")
The output looked like this:
- turn_preparation -
action_finished signal received
So I knew I didn't write the signal name wrong and that it was emitted at the right time.
but the yield didn't resume.
I would've liked to share the project but its private and I couldn't reproduce it again to create a example project after the fact, but that output is weird right?.