Problem trying to add lives

Yan

Member
Hello, I'm using the maze game module and tried to implement lives but after I die the score glitches, the music stops and collecting all the "things" on screen doesn't take me to the next level.

The PlayerLoseLife.asm looks like this:
Code:
    DEC myLives
    LDA myLives
    BNE gameNotOver
    JMP RESET
    
gameNotOver:

    LDA #$00
    STA newGameState
    LDA continueMap
    CLC
    ADC #$01
    STA temp
    GoToScreen continueScreen, temp, #$04
    LDA #$00
    STA playerToSpawn
    LDA #$01
    STA loadObjectFlag
 
    LDA continuePositionX
    STA newX
    LDA continuePositionY
    STA newY
 

dale_coop

Moderator
Staff member
For the music stoping when dying...
Modify the script assigned to the "Handle Player Death" (in your Project Settings > Script Settings)... in that script you'll find the line
Code:
	StopSound
Just comment tha tline:
Code:
	; StopSound

For the collecting all the tiles and not completing the level, issue...
Here's the fix: http://nesmakers.com/viewtopic.php?p=13494#p13494

About your glitching hud score... Is it happening each time you die?
How is dipslayed your score in the HUD? a Number with 8 digits?
 

Yan

Member
Now the music doesn't stop and dying once doesn't lock me on the same screen even after collecting everything, thanks!

I am using a number with 8 digits for the score and after dying the "00000000" becomes a "000000□0". A score of "00000010" becomes "000001□0" for example.
 

dale_coop

Moderator
Staff member
If you don't re spawn in the current screen, maybe you haven't placed any checpoint tiles on your screen (usually placed at the spot you warp in)?
For your glitch hud... you oculd try that fix: http://nesmakers.com/viewtopic.php?f=60&t=2382&start=20
 

Yan

Member
Checkpoints are working fine actually :D

The hud fix didn't work but it's nothing gamebreaking so I will worry about it later.

Thanks for all the help!
 
Top Bottom