Image not available
How to connect a signal in GDScript - Godot 4
Published: May 1, 2024
Last updated: June 4, 2024
- Code snippet
- Godot
Signal can be connected through the editor, but it's also useful to know how to connect signal in GDScript.
Here's how to do it:
signal example_signal
func _ready() -> void:
example_signal.connect(_on_example_signal)
func _on_example_signal():
print("Example signal has been emitted")
About the author
Hey there 👋
I'm Blaubessen, a web dev learning Godot. This website is my way of documenting my learnings, and hopefully be useful to other folks as well.
If you find mistakes, disagree with something written, or just have general feedback please feel free to leave a comment on this form!