Bucket Mouse
Active member
As it is, the Autotext tile status works just once when you stand on it, and not again -- as it should. However, if you leave the screen, it will activate again.
There are times when you don't want it to do this. Therefore I've added something to it that responds to a trigger.
If you want to eliminate the text box effects from the screen permanently after one use, make your text set off a trigger. Now, when you return to the triggered screen, that text will no longer appear.
if you DON'T want this, just don't use a trigger on that screen. Or use the original unmodified version below:
There are times when you don't want it to do this. Therefore I've added something to it that responds to a trigger.
Code:
CPX player1_object
BNE finishedWithAutoText
lda screenType ;; this is the value of the screen to change.
AND #%00000111 ;; look at last bits to know what bit to check, 0-7
TAX
LDA ValToBitTable_inverse,x
STA temp
lda screenType
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
AND temp
BNE finishedWithAutoText
JSR GetTileAtPosition
LDA collisionTable,y ;<<-- check the current tile collision data
BEQ finishedWithAutoText
ChangeTileAtCollision #$00, underSecret ;<<-- change the collision data of the current tile to null walkable and graphics to undersecret
LDA #$01
STA textBoxFlag
JSR dodrawTextBox
finishedWithAutoText:
If you want to eliminate the text box effects from the screen permanently after one use, make your text set off a trigger. Now, when you return to the triggered screen, that text will no longer appear.
if you DON'T want this, just don't use a trigger on that screen. Or use the original unmodified version below:
Code:
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