Warp to game over screen

dale_coop

Moderator
Staff member
If you're not on the correct screen, where are you warped to, now?
...maybe that could help us to guess what's going on here.
 
Now it seems whenever I die I get sent to screens I don't want to be sent to. From what I can tell, it just warps me to the underworld screens from the overworld. For example, if I'm in overworld screen x=1, y=3, it sends me to underworld screen x=1, y=3. In this case there shouldn't even be a screen for this since I'm using 8x8 tile mode for all of my underworld screens, right? I don't get why this is happening.
 

dale_coop

Moderator
Staff member
Now it seems whenever I die I get sent to screens I don't want to be sent to. From what I can tell, it just warps me to the underworld screens from the overworld. For example, if I'm in overworld screen x=1, y=3, it sends me to underworld screen x=1, y=3. In this case there shouldn't even be a screen for this since I'm using 8x8 tile mode for all of my underworld screens, right? I don't get why this is happening.
Oh I see, it might be because your continueMap variable is not set.
Do you use checkpoint tiles? If you do, can you share the script?
If you don't use checkpoint tiles,. can you share your Handle Player Hurt script and your EntTimerScripts script ?
 
I do use checkpoints. Here's the script code:

Code:
;;; sets a new player continue checkpoint.
    CPX player1_object
    BEQ +doCheckpoint
        JMP +skip
    +doCheckpoint
    LDA currentNametable
    STA continueScreen
    LDA Object_x_hi,x
    STA continueX
    LDA Object_y_hi,x
    STA continueY
    
    ChangeTileAtCollision #$00, #$00 ;; change to tile zero (make disappear), collision type 0
    PlaySound #sfx_Checkpoint
    AddValue #$04, myScore, #$01, #$03
    UpdateHudElement #$04
    
+skip
 

dale_coop

Moderator
Staff member
I do use checkpoints. Here's the script code:

Code:
;;; sets a new player continue checkpoint.
    CPX player1_object
    BEQ +doCheckpoint
        JMP +skip
    +doCheckpoint
    LDA currentNametable
    STA continueScreen
    LDA Object_x_hi,x
    STA continueX
    LDA Object_y_hi,x
    STA continueY
   
    ChangeTileAtCollision #$00, #$00 ;; change to tile zero (make disappear), collision type 0
    PlaySound #sfx_Checkpoint
    AddValue #$04, myScore, #$01, #$03
    UpdateHudElement #$04
   
+skip
After the " STA continueY " line, try adding:
Code:
LDA warpMap
STA continueMap
 
Top Bottom