;; set this tile as a NPC text tile:
LDA npc_collision
ORA #%00000010
STA npc_collision
LDA tileCollisionFlag
BEQ +
JMP finishedWithAutoText
+
LDA #$01
STA tileCollisionFlag
ChangeTileAtCollision #$00, underSecret ;<<-- change the collision data of the current tile to null walkable and graphics to undersecret
;;; !! HERE !! you can set the text you want (Text 1="00" or Text 3="01" or Text 4="02" or Text 4="03" from the TextGroup assigned to your screen):
LDA #$00 ;;<<-- it will use the "Text 3" of your screen
STA textVar
;; activate the text-box:
LDA gameHandler
ORA #%00100000
STA gameHandler
LDA #%10000000
STA textboxHandler
;TriggerScreen screenType
finishedWithAutoText: