#Signal is emitted but not received

4 messages · Page 1 of 1 (latest)

ocean jacinth
visual heron
#

You made a typo on the method that you connect to your lightning_collected signal. Your method is called _on_lightning_collected and not _on_lightning_connected.
In Godot 4 you can use this syntax to connect signals now:

node.lightning_collected.connect(_on_lightning_collected)

The editor will then also give you a warning if that method doesn´t exist in case you make a typo again!

Also to emit signal you can write

lightning_collected.emit()

and if you had any arguments for your signals:

signal_with_arguments.emit(arg1, arg2)
ocean jacinth
#

Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

#

You're right, darn!! Thank you!