Get help using GDevApp.
User avatar
By Lizard-13
#66577 When you collide with a checkpoint, deactivate the previous one and activate the new one with an object variable:
Code: Select allConditions: Player collides with Checkpoint
Actions: No actions

        // Deactivate all the checkpoints
        Conditions: Take into account all Checkpoint
        Actions: Do = 0 to variable "active" of Checkpoint

        // Activate the new Checkpoint
        Conditions: No conditions
        Actions: Do = 1 to variable "active" of Checkpoint


Then when you are dead, select the active Checkpoint and go for its location:
Code: Select allCondition: Player collides with Enemy
           Variable "active" of Checkpoint is = 1
Actions: Do - 1 to variable "lives" of Player
         Do = Checkpoint.X() ; = Checkpoint.Y() to the position of Player