BLINKCADEAI GAME DEVELOPMENT
Sign In
Interactive lesson GE-210 Godot Input, Signals, Time, and Physics

Emit a Typed Collectible Signal

Inside collect(), emit the collected signal with points before queue_free() is called.

Scene lab 25 minutes Godot 4.7.2

Tested with: Godot 4.7.2 · Estimated time: 25 minutes

Result

Clicking the crystal adds ten points to the score label.

Your task

Emit collected(points) before the collectible calls queue_free().

Why it matters

The collectible announces what happened without knowing which system will update the score.

Independent challenge

Add a second collectible worth 25 points without changing the main score handler.

Learning objectives

  • Declare a signal with a typed payload.
  • Emit an event before the source node is removed.
  • Keep the collectible independent from the score system.

Interactive Godot Lab

The lab works immediately in browser practice mode. When the isolated runner is connected, the same workspace also performs engine-authoritative Godot checks.

Native Godot project files

Download the starter project  ·  Download the completed reference project