There are times when you don't want it to do this. Therefore I've added something to it that responds to a trigger. I took the code from Handle_CheckForTriggers.asm and copied the relevant parts (the part that actually checks for a trigger). It worked on my first try, so....hooray for improbable circumstances!
Code: Select all
;; CHANGE to a "0 - Walkable" special Tile "UnderSecret" LDA screenType ;; divide by 32 LSR LSR LSR ;LSR ;LSR ;;; now we have the right *byte* out of the 32 needed for 256 screen bytes TAY LDA screenTriggers,y ;; now the rigth bit is loaded into the accum STA temp LDA screenType AND #%00000111 ;; look at last bits to know what bit to check, 0-7 TAX LDA ValToBitTable_inverse,x AND temp BNE finishedWithAutoText CPX player1_object ;; check if it is the player (not a monster) BNE finishedWithAutoText ChangeTileAtCollision #$00, underSecret LDA #$01 STA textBoxFlag JSR dodrawTextBox finishedWithAutoText: ;;RTS
if you DON'T want this, just don't use a trigger on that screen (or delete everything above CPX player1_object)
I thought this trick might be applicable with other tile types, so I tried using it with the Warp tile. For some reason it doesn't work even though it's the same code -- it just cancels out the tile's effects whether the screen is triggered or not. Does anyone know why that would happen?