Autotext Tile in 4.1

User avatar
Bucket Mouse
Posts: 323
Joined: Wed Mar 07, 2018 2:25 am

Re: Autotext Tile in 4.1

Post by Bucket Mouse » Fri Feb 22, 2019 6:00 am

BentPawGames wrote:
Fri Feb 22, 2019 4:53 am
I can't seem to get this to work. One thing I don't understand is the "finishedWithAutoText". Doesn't this imply that there is some kind of autotext command or macro existing somewhere in the asm files? I don't see any reference to it in the text box asm. I feel like I am missing something and this is calling for something that hasn't been defined/created in my asm.
"Finished with AutoText" is not a macro or a variable, it's a marker. If you look at the end, it's listed there. The code says to skip to the line called "Finished with AutoText" whenever it's done.

There's an easy way to find these things out: open the folders in Windows where NESMaker is located and do some search commands for a specific name. All the ASM files where it comes up will be listed. You'll be able to see exactly what it does and how it's used throughout the game.

Someone please help me with my Countdown Timer problem; I'm still waiting for a response in the other topic.
User avatar
BentPawGames
Posts: 173
Joined: Wed Jan 16, 2019 10:29 pm

Re: Autotext Tile in 4.1

Post by BentPawGames » Fri Feb 22, 2019 2:19 pm

Ah ok thanks for clarifying.
adeventureman
Posts: 36
Joined: Sat Aug 25, 2018 7:32 pm

Re: Autotext Tile in 4.1

Post by adeventureman » Sun Feb 24, 2019 6:39 pm

I Figured it out guys! thanks so much this is going to send my adventure game to the next level.I feel a a Community tutorial for this would be admicably beneficial to the entire community as auto text is a very important aspect of story telling at the smalles level in games!!! keep it up you guys rock
Last edited by adeventureman on Sun Feb 24, 2019 7:00 pm, edited 1 time in total.
adeventureman
Posts: 36
Joined: Sat Aug 25, 2018 7:32 pm

Re: Autotext Tile in 4.1

Post by adeventureman » Sun Feb 24, 2019 6:39 pm

yall are rockstars
FerretHallGaming
Posts: 25
Joined: Sat Jan 12, 2019 4:37 am
Location: East Chicago
Contact:

Re: Autotext Tile in 4.1

Post by FerretHallGaming » Fri Mar 08, 2019 6:52 am

dale_coop wrote:
Wed Jan 23, 2019 7:06 am
Here's mine:

Code: Select all

	CPX player1_object
	BNE finishedWithAutoText
	
	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
	
	;; activate the text-box:
	LDA gameHandler
	ORA #%00100000
	STA gameHandler
	LDA #%10000000
	STA textboxHandler
	
	;TriggerScreen screenType
	
finishedWithAutoText:
Hey Dale. A bit less experienced of a user here. How does one go about implementing this into their project? So far I've created the new file in the Module/TileScripts/Adventure, and I've imported it. What else needs to be done to get it to function?
FerretHallGaming
Posts: 25
Joined: Sat Jan 12, 2019 4:37 am
Location: East Chicago
Contact:

Re: Autotext Tile in 4.1

Post by FerretHallGaming » Fri Mar 08, 2019 7:20 am

Nevermind. Linked it up to TileCollision09 by exploring the Project Settings and using common sense. Dale, you're one hell of a guy. I'd give my good nut for half the skill you possess.
FerretHallGaming
Posts: 25
Joined: Sat Jan 12, 2019 4:37 am
Location: East Chicago
Contact:

Re: Autotext Tile in 4.1

Post by FerretHallGaming » Sun Mar 10, 2019 8:51 am

Can anyone figure out (if possible) a way to make triggering a screen turn off the auto-text tiles/reset them to walkable?
User avatar
dale_coop
Posts: 3956
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Autotext Tile in 4.1

Post by dale_coop » Sun Mar 10, 2019 11:58 am

Inspired by the collectable tile type, you could try something like that:

Code: Select all

	CPX player1_object
	BNE finishedWithAutoText
	
	LDA tileCollisionFlag
	BEQ +
	JMP finishedWithAutoText
+
	LDA #$01
	STA tileCollisionFlag
	
	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
	
	;; activate the text-box:
	LDA gameHandler
	ORA #%00100000
	STA gameHandler
	LDA #%10000000
	STA textboxHandler
	
	;TriggerScreen screenType
	
finishedWithAutoText:
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
FerretHallGaming
Posts: 25
Joined: Sat Jan 12, 2019 4:37 am
Location: East Chicago
Contact:

Re: Autotext Tile in 4.1

Post by FerretHallGaming » Sun Mar 10, 2019 9:29 pm

The man, the myth, the legend! Thanks, Dale :) Even in the eleventh hour you're a gentleman and a scholar.
User avatar
BentPawGames
Posts: 173
Joined: Wed Jan 16, 2019 10:29 pm

Re: Autotext Tile in 4.1

Post by BentPawGames » Wed Apr 17, 2019 4:28 am

For some reason Dale's original code still doesn't work for me:

Code: Select all

	CPX player1_object
	BNE finishedWithAutoText
	
	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
	
	;; activate the text-box:
	LDA gameHandler
	ORA #%00100000
	STA gameHandler
	LDA #%10000000
	STA textboxHandler
	
	;TriggerScreen screenType
	
finishedWithAutoText:
But then his other version does:

Code: Select all

	CPX player1_object
	BNE finishedWithAutoText

	
	LDA tileCollisionFlag
	BEQ +
	JMP ++
+	
	LDA #$01
	STA tileCollisionFlag
	
	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:
	

However, while the text box comes up, I can't make it advance or go away by pressing the B button like I normally would. Not sure what is going on there.
Post Reply