Warping is messed up... [Solved]

JeffPack

New member
So I have a screen with a locked door in what we'll call Room 1. Player gets the key unlocks the door and warps to Room 2 which is the next screen up.

Everything works up to this point. Then, when I walk back through the door to Room 1.... it works! But here's the tricky part.
When I walk through the now open door in Room 1 it will flicker Room 2 for a brief second and then instantly transport me back to Room 1.
My warp coordinates have to be correct because it worked the first time I walked through the door when it was unlocked!

Here's Room 1:
Capture1.PNG

Here's Room 2 which is directly above it:
Capture2.PNG

... Help! :(
 

dale_coop

Moderator
Staff member
Have you tried to modify the wrap in locations (to Room 1: 2,5 and Room 2: 2,11) to see if it's not a collision problem with the wrap tiles ?
 

JeffPack

New member
dale_coop said:
Have you tried to modify the wrap in locations (to Room 1: 2,5 and Room 2: 2,11) to see if it's not a collision problem with the wrap tiles ?

I tried several ways. At first I thought it was the warp locations too. But then I realized it works fine the first time you walk through the door. So it can't be the locations.
 

JeffPack

New member
I finally figured it out. Turns out that Handle_Check_For_Triggers.asm was changing the tile to a walkable tile.

Since the unlocked door was on the edge of my screen, it was just doing a simple screen transition which caused me to collide with the corresponding warp tile on the next screen.

Here's the original code
Code:
FindLockedDoorTilesTarget_onScreenLoad:
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	;; FIND TRIGGER TYPE HERE
	LDA collisionTable,y
	CMP #$03 ;; compare to locked door target type
			;; if your trigger type is NOT #$06
			;; then change this to the tile type
			;; of your trigger
	BNE notALockedDoorTarget_onScreenLoad
	LDA #$02
	STA collisionTable,y ;; collision table is changed.
						;; graphics are a little trickier

	ChangeTile #$00, underSecret

I had to change the last line to
Code:
	ChangeTile #$02, underSecret
 
Top Bottom