I have a mission with Objectives 1, 2 and 3

I want mission to end if player dies but not all objectives accomplished. The twist is the player is supposed to die in last objective so if dies after accomplishing all objectives he wins and if he dies with one objective not finsihed he loses. Any tips are appreciated.