+1 vote

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.

Godot version 3.4
in Engine by (15 points)

1 Answer

0 votes

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)

by (99 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.