Basic Signal Help?

Godot Version

4.2.2

Question

Howdy! I’m trying to send a signal to a node in another scene, but I don’t really know how. There doesn’t appear to be a way in the GUI, and the tutorials I’ve watched were either outdated or not concise. Could anybody help me? Thanks so much!

What does your scene look like? From what to where are you trying to connect?

If both nodes are present as instances in another scene, like a “world” or “level” then you can connect the signal throug the editor interface.

Hello! They aren’t children, I have a player and a spike, and I want the player to delete itself when it touches the spike (Without deleting the children, preferably). There is a world tab, spike tab and a player tab.

Sounds like a signal that can be handled by either internally. If the spike has a area2D on it you can connect body_entered to itself, then check if that body is the player and delete them (or show a game over screen)

func _on_body_entered(body: Node2D) -> void:
    if body.name == "Player":
        body.queue_free()
1 Like

Hey! Thanks for the help! I figured out something else, but thanks so much for replying :smiley: