Checkpoints doesn't work on coins

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By scopericrit

I made a checkpoint that change the spawnpoint position to it’s position, its work fine but the coins resets when the player died and the scene resets. I use tilemap to add coins to the scene. I just need the coins to be affected like if the coin collected, the checkpoint activated and the player died that coin is not there. Also this is my first time posting here, so sorry if I’m wrong at something.

:bust_in_silhouette: Reply From: David000

So first off, make a seperate scene with the coin and just import it into the world scene. Its way less of a hassle and more dynamic and good practice.

Instead of reseting the whole scene, just teleport the player to the last spawnpoit pos.

And to set the spawnpoint pos to the last coin collected pos, maybe do a global script? Or make a vector2 variable that changes based on the pos of the coin.

Finaly, from a game design perspective, having a spawn point every time you collect a coin could make the game less challanging (which isnt fun). If there are not many coins on a level, add more and if there is some sort of shop, increase the prices. Have spawnpoints in the middle of the level or after a tricky part. (This is what I would do)