connect_signal
Connect a signal from a source node to a method on a target node, saving the connection into the .tscn file. Returns confirmation.
Instructions
Connect a signal on a source node to a method on a target node, persisting the connection in the .tscn. Use after get_node_signals to confirm the signal name on the source and the method name on the target. Connecting the same signal+method pair twice creates a duplicate connection — call get_node_signals first if uncertain. Saves automatically. Returns a plain-text confirmation naming the source, signal, target, and method. Errors if the signal does not exist on the source node or the method does not exist on the target node.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | Method name on the target node to call when the signal fires | |
| signal | Yes | Signal name on the source node (e.g. "pressed", "body_entered") | |
| nodePath | Yes | Source node path from scene root | |
| scenePath | Yes | Scene file path relative to the project | |
| projectPath | Yes | Path to the Godot project directory | |
| targetNodePath | Yes | Target node path from scene root that receives the signal |