Signal

Category: Listener Tier: Basic

Purpose

Detects when a specific Godot signal is emitted by a target node.

Visual Reference

As added to your scene
Signal brick as it appears in the GDLink editor

Runtime Behavior

Inputs None.

Outputs

  • Signal Received (Pulse): True for one tick when the signal is emitted.

Properties

  • signal_name (signal_dropdown, “”): The name of the signal to listen for (populated from target node’s available signals).

  • target_node (string, “”): The node to connect to. If empty, connects to the owner node.

Execution Behavior

Connect Logic

  • On initialization (or when Target Node changes), the listener attempts to connect a Callable to the signal_name of the target_node.

  • The Callable points to an internal callback _on_signal_emitted(args).

  • Cleanup: Must disconnect signals in _exit_tree() or NOTIFICATION_PREDELETE to prevent “Attempt to disconnect non-existent signal” errors if target is freed before listener.

Tick Behavior

  • The listener maintains a triggered_this_frame flag.

  • The callback sets triggered_this_frame = true.

  • During evaluate_sensors(), if triggered_this_frame is true:

    • distinct positive pulse is generated.

    • triggered_this_frame is reset to false after evaluation (or safely queued for next frame if signal happens mid-tick?).

    • Note: Godot signals happen immediately. If the signal happens during the physics process, we capture it. If it happens outside (e.g. GUI input process), we must store it until the next evaluate_sensors().

State Changes

  • Inactive: Not connected or node not found.

  • Active: Connected and listening.

Examples

Basic Usage

  • Signal Name: mouse_entered

  • Target Node: ../Button

Generated UI Mockup — showing expanded properties
Signal
-
x
Name:
Label this brick...
Target Node:
v
Signal Name:
v
Invert

Properties

Property

Type

Default

Notes

Signal

signal_dropdown

Signal to listen to

Target Node

string

Node that emits the signal (empty = self)