When I lose my last life the game performs a jmp reset so I take it that I have to modify my player hurt script.
dale_coop made a tutorial here on the forum a few months ago. It's for the metroVania module, but it shouldn't be too much work to use it in the Maze module:
Death animation, checkpoints and Game Over screen I'll explain a simple way of implementing this. Context: Your player is hurt and has no health left, instead of restarting the screen, we'll display his death animation. And if he still has lives, we'll send him back to the last checkpoint...
www.nesmakers.com
If you only want to go to the Game Over screen instead of JMP RESET then just change this in the playerHurt file:
FROM THIS:
LDA myLives
BNE +notZeroLives
;;;zero lives
JMP RESET
+notZeroLives
TO THIS:
LDA myLives
BNE +notZeroLives
;;;zero lives
WarpToScreen warpToMap, #255, #1
+notZeroLives
And then just make a Game Over screen on the bottom right screen on the map. Make sure to set the Warp In location for the player on that screen. You should also change the game state on that screen from Main Game to for example GameState-3, and click Hide Sprites under Screen Info. That way you make sure the player isn't visible and disable movement. You also need some kind of warp script or something to get away from the game over screen, or you could just reset the game with a new input script like this:
;;; Reset on Game Over screen
JMP RESET
RTS
If you use this input script you need to make sure you set it to GameState-3 and not Main Game in the Input Editor.
PS! You can change the name
GameState-3 to
Game Over Screen under Project Settings - Project Labels - Game States.