Hello,
To make the checkpoint system in my game, I’m planning to use an object to check all the “checkpoints” the character has passed through, but I’ve got the problem that everytime the character dies I’ve got to restart the level and load it again. So the object must have the DontDestroyOnLoad function.
What I’m having problems with, is when I want to check, If the character died, and the level restarted, or i’m actually loading a new level. I don’t find any way to check this.
Then, if it was a level restart because the character died, spawn the character on the last checkpoint. If he otherwise completed the level, check for the first checkpoint in the new level and spawning him there.
Also, I wanted to know, if the start function, is executed everytime the level is loaded even if the object is not destroyed between levels
Thank you