Problem trying to add lives

Post Reply
User avatar
Yan
Posts: 46
Joined: Sun Dec 01, 2019 11:49 pm
Location: Brazil

Problem trying to add lives

Post by Yan » Tue Jan 14, 2020 4:27 pm

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: Select all

    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
Stuff I've made with NESmaker:
MEGAZAME
User avatar
dale_coop
Posts: 5625
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Problem trying to add lives

Post by dale_coop » Tue Jan 14, 2020 4:51 pm

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: Select all

	StopSound
Just comment tha tline:

Code: Select all

	; 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?
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
User avatar
Yan
Posts: 46
Joined: Sun Dec 01, 2019 11:49 pm
Location: Brazil

Re: Problem trying to add lives

Post by Yan » Wed Jan 15, 2020 1:39 pm

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.
Stuff I've made with NESmaker:
MEGAZAME
User avatar
dale_coop
Posts: 5625
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Problem trying to add lives

Post by dale_coop » Wed Jan 15, 2020 4:09 pm

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
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
User avatar
Yan
Posts: 46
Joined: Sun Dec 01, 2019 11:49 pm
Location: Brazil

Re: Problem trying to add lives

Post by Yan » Fri Jan 17, 2020 5:04 am

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!
Stuff I've made with NESmaker:
MEGAZAME
User avatar
dale_coop
Posts: 5625
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Problem trying to add lives

Post by dale_coop » Fri Jan 17, 2020 10:01 am

I remember that hud score issue...
But don't remember how to fix it.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
Post Reply