crei0 @mastodon.gamedev.place
Posts 0
Comments 1
Godot 4 Help Understanding Signals 2 1
@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"
Reply
Next