minus-squarecrei0@mastodon.gamedev.placetoGodot@programming.dev•Godot 4 Help Understanding Signalslinkfedilinkarrow-up1arrow-down1·1 year ago@plixel @Rodeo The way I’m doing in my game is by Using a Signals.gd script Add that script to Project settings > Autoload, this makes the script globally accessible (singleton) Then from the scene I want to send the signal, I do Signals.my_signal_was_triggered.emit() Then on the scene/node (can by multiple) I want to receive the signal emission, I do Signals.my_signal_was_triggered.connect(my_function) Create the function “my_function” linkfedilink
@plixel @Rodeo
The way I’m doing in my game is by
Using a Signals.gd script
Add that script to Project settings > Autoload, this makes the script globally accessible (singleton)
Then from the scene I want to send the signal, I do
Signals.my_signal_was_triggered.emit()
Then on the scene/node (can by multiple) I want to receive the signal emission, I do
Signals.my_signal_was_triggered.connect(my_function)
Create the function “my_function”