Textbox on first time a room is entered?

Hey!
So in a project, I need a textbox to appear when the player enters a room, preferably using a custom tile type.
So I need it to appear if a variable is equal to zero, and when the textbox is over, it sets said variable to one, disabling the textbox.
I tried to modify the NPC tile type to no success.
Heres what I tried:
Code:
;;Show the goal
	LDA GoalShown
	CMP #$00
	BEQ +
	LDA textBoxFlag
	BNE +
	LDA #$00
	STA stringTemp
	LDA #$01
	STA textBoxFlag
+:
Help is appreciated!
(PS: I don't mind getting my hands dirty with ASM)
 
So I tried the "auto-text" tile, and it dosnt seen to work for me...
so I tried this, based on the what they were using, and still nothing.
Code:
;;Showgoal tile
	LDA GoalShown
	CMP #$00
	BEQ doDraw
	RTS

doDraw:
	LDA #$01
	STA textBoxFlag
	JSR dodrawTextBox
	LDA #$01
	STA GoalShown
	RTS
 
Top Bottom