Making multiple coins

I’m making a scoring system in my game which will use coins and a counter. My coin is animated so ive made a tilesource and sprite. When the player hits the collision group of the sprite the it sends a message to the gui to increase the counter by 1. My question is: how i i get the coin to despawn when the player hits it and and how can i put multiple coins in my level while using 1 single sprite?

You use go.delete(coin) to delete a game object (containing your coin sprite).

You can either place multiple coin.go files in your level collection manually from the editor, or you can spawn coins using a factory component:

1 Like

You can take a look at this example and adjust it from being bullets hitting an enemy to coins colliding with the player:

1 Like