Using groups

Groups provide a tagging system for nodes, allowing you to identify similar nodes. A node can belong to any number of groups. You need to ensure that all coins will be in a group called coins for the player script to react correctly to touching the coin. Select the Coin node and click the Node tab (the same tab where you found the signals) and choose Groups. Type coins in the box and click Add, as shown in the following screenshot:

Get Godot Engine Game Development Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.