A student would like to insert a checkpoint so that they do not have to play the game from the beginning if they fall. How can this be programmed?
Hello,
Thank you for your question.
This is possible by creating a “Checkpoint” object that, upon contact with the player character, creates a new object, e.g., “active checkpoint” (and optionally destroys itself).
If the player character takes damage, it can simply be teleported relative to the “active checkpoint”. In this case, Candli teleports the player character to the nearest instance of the “active checkpoint” object.
I have created a sample game that you can test here:
Thank you very much for the example!