I want to make it so that when the player reaches a checkpoint, the previous checkpoint they touched gets deleted (or deactivated). How can I do this? (This is so that in a vertical platformer, the highest checkpoint they ever reached will always be where they respawn, even if they fall back down to a previous checkpoint)
I assume this can be done somehow by giving each instance of the checkpoint object an ID (I’ve already placed all the checkpoints in the level editor), but I don’t know how to do that or what to do after. Please explain this to me as precisely as possible or maybe even give an example of the code, if possible! I’d appreciate the help.