Does anyone know how to add checkpoints to a level so that when you die you don’t have to do the entire game over again. They just respawn at the checkpoint, and it resets back to the first one when the win?
Instead of gameover call the level. Or if it is a long level, create variables storing the checkpoint locations.
I would just create a location variable called respawn_location
(which would be where they first spawned) and every time you overlap a checkpoint tile then set the current location the the respawn_location
variable. Then, when the player dies, just sent the players position to the respawn_location
.
I would do the same as @UnsignedArduino just with function!
in lava
just kidding
Thanks guys this helps a lot!
Xept for me I did completely nothing
You are still appreciated. hands participation trophy
thank you best trophy ever
I actually don’t quite understand how do make checkpoints, could you send me the exact code?
I mean an idea for a check point is having a tile a checkpoint, for when you die, have the sprite placed on a random checkpoint tile, but only place one checkpoint tile. Upon reaching a new checkpoint, you could erase the old checkpoint and replace the checkpoint tile on the “new” checkpoint. your welcome. Check it out, https://makecode.com/_5RPJ0x6AKURM
This is a remarkably simple and effect method! Thank you for sharing this with us. My students just asked me about this idea, and I also considered making a variable that would get updated and call on a “new level” function. Your method is more concise for a beginner and accomplishes what they wanted.