I had some issues with the the npc_collision flag and textbox tiles / autotext tiles... personally, I decided to use my own variable to deal with that...
I declared a new "npc_autotext" user variable (or any name you want) in "Project Settings > User Variables".
Then I modified the AutoText.asm tile script to:
Finally, modified the b_Activate_text_box.asm script, like that:
It's not THE solution... it's a workaround.
I declared a new "npc_autotext" user variable (or any name you want) in "Project Settings > User Variables".
Then I modified the AutoText.asm tile script to:
Code:
CPX player1_object
BNE finishedWithAutoText
LDA tileCollisionFlag
BEQ +
JMP finishedWithAutoText
+
LDA #$01
STA tileCollisionFlag
STA npc_autotext ;; fix for the ">"more
ChangeTileAtCollision #$00, underSecret ;<<-- change the collision data of the current tile to null walkable and graphics to undersecret
;; activate the text-box:
LDA gameHandler
ORA #%00100000
STA gameHandler
LDA #%10000000
STA textboxHandler
;TriggerScreen screenType
finishedWithAutoText:
Finally, modified the b_Activate_text_box.asm script, like that:
Code:
LDA textboxHandler
AND #%00010000 ;; if the b button is pressed
;; but the box + text have been activated
;; and also the 'do box' bit is OFF
;; that means this is ready to "go away".
BEQ checkToTurnTheTextboxOn ;; hasn't started yet
;; begin turning the textbox off.
LDA gameHandler
ORA #%00100000
STA gameHandler
;;; are we turning this on or off?
;;; check for more
;;; check for 'choice'.
LDA #$00
STA updateNT_offset
STA updateNT_H_offset
STA updateNT_V_offset
STA npc_autotext ;;<-- dale_coop: for autotext tiles
LDA #%10001000
STA textboxHandler
RTS
checkToTurnTheTextboxOn:
LDA npc_autotext ;;<-- dale_coop: for autotext tiles
BEQ +
JMP ++
+
LDA npc_collision
BEQ noNPCcollision
++
LDA textboxHandler
AND #%10000000
BNE noNPCcollision
LDA gameHandler
ORA #%00100000
STA gameHandler
;;; are we turning this on or off?
;;; check for more
;;; check for 'choice'.
turnTheTextboxOn:
LDA #%10000000
STA textboxHandler
noNPCcollision:
RTS
It's not THE solution... it's a workaround.