Simple Autotext/Cutscenes [4.15]

User avatar
CGdfc
Posts: 58
Joined: Sat Jun 08, 2019 12:40 am
Location: Spain

Re: Simple Autotext/Cutscenes [4.15]

Post by CGdfc » Wed Mar 25, 2020 4:42 pm

I think I have solved it, it seems that the problem was the npc that I used to make the auto texts (very large in size)
User avatar
Bucket Mouse
Posts: 460
Joined: Wed Mar 07, 2018 2:25 am

Re: Simple Autotext/Cutscenes [4.15]

Post by Bucket Mouse » Wed Apr 08, 2020 6:30 am

Hey, you might like to know....cancelling out the player sprite the way you do (in DrawSprites) only prevents the player sprite from being visible. You can still move the invisible player sprite, and load another screen if you hold one of the directional buttons long enough.

It needs one extra line. Here is the corrected version that deactivates the player sprite entirely:

Code: Select all

CPX player1_object
	BNE +
	LDA screenType
	CMP #$F9 ;; #249 ;whatever screen type you want
	BNE +
	DeactivateCurrentObject
	RTS
	+
Also, there's one other issue, which I can't resolve yet: if you use the > symbol to break up the text, the screen freezes. I've asked Dale for help on this.
User avatar
crazygrouptrio
Posts: 126
Joined: Fri Jan 11, 2019 2:22 pm
Location: United States
Contact:

Re: Simple Autotext/Cutscenes [4.15]

Post by crazygrouptrio » Thu Apr 09, 2020 12:23 pm

Bucket Mouse wrote:
Wed Apr 08, 2020 6:30 am
Hey, you might like to know....cancelling out the player sprite the way you do (in DrawSprites) only prevents the player sprite from being visible. You can still move the invisible player sprite, and load another screen if you hold one of the directional buttons long enough.

It needs one extra line. Here is the corrected version that deactivates the player sprite entirely:

Code: Select all

CPX player1_object
	BNE +
	LDA screenType
	CMP #$F9 ;; #249 ;whatever screen type you want
	BNE +
	DeactivateCurrentObject
	RTS
	+
Also, there's one other issue, which I can't resolve yet: if you use the > symbol to break up the text, the screen freezes. I've asked Dale for help on this.
Thank you for your line suggestion to the tutorial ( I guess since the player can't move while text is on the screen its never been a problem for me :lol: ) I'm not sure about the issue with > however. I setup this script again and it seems to work fine as is in that regard. The only time I encountered a problem with > is when I warped from one "cutscene" screen to another. Then it would get stuck. I tried the suggestion posted in the fb group of removing

Code: Select all

; LDA npc_collision
; BEQ noNPCcollision
from the input script but that definitely caused other problems... Unfortunately I do not have time at the moment to dive deep into it, but I put a warning up in the tutorial so anyone can know its a possibility. Hopefully someone more qualified than I has a fix for it :oops:
The Games I've Made/Am Making:
Shera & The 40 Thieves
Mawthorne: Ancient Quest
Afterlight
Raid or Die!
User avatar
dale_coop
Posts: 5752
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Simple Autotext/Cutscenes [4.15]

Post by dale_coop » Thu Apr 09, 2020 1:05 pm

Ok, I tested the scripts from the tutorial Page 1. And it works great for me (even the ">").
In those scripts, it's the lines with:

Code: Select all

	STA npc_autotext
That will make the code (">") working correctly.

So, Bucket Mouse, I'd suggest you to check that your scripts are the same than the ones on page 1.
Maye you changed something (I suspect you add already a "activate_text_box" script assigned to your inputs... and you kept it, instead of replacing it with the new one, from this tutorial?)
-----
I know... my english is not perfect
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
User avatar
Bucket Mouse
Posts: 460
Joined: Wed Mar 07, 2018 2:25 am

Re: Simple Autotext/Cutscenes [4.15]

Post by Bucket Mouse » Thu Apr 09, 2020 7:36 pm

They are the same. And it's only your script -- no repeats. This IS your script exactly, isn't it???

Code: Select all

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 come to this....I've attached the graphics files, routines and save file of my project to this post. Inspect it all for yourself, and please let me know just WHAT I'm doing wrong. And let me know when you've got this so I can delete the file.
Last edited by Bucket Mouse on Thu Apr 09, 2020 9:25 pm, edited 1 time in total.
User avatar
dale_coop
Posts: 5752
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Simple Autotext/Cutscenes [4.15]

Post by dale_coop » Thu Apr 09, 2020 9:22 pm

Hmmm, ok, let me check that.
I just downloaded your file, you can remove it.
-----
I know... my english is not perfect
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
User avatar
dale_coop
Posts: 5752
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Simple Autotext/Cutscenes [4.15]

Post by dale_coop » Thu Apr 09, 2020 10:02 pm

Ok, it's a small error in the TextAction.asm script... the bug is the ">" will not work with the first Text.... on the other Texts (Text 2, 3, 4) it works.
This morning, I tested with Text 2, it' the reason it was working for me.

Here's a fixed "TextAction.asm" script:

Code: Select all

	LDA textaction
	CMP #$03
	BNE +
	JMP textFour
	+
	LDA textaction
	CMP #$02
	BNE +
	JMP textThree
	+
	LDA textaction
	CMP #$01
	BNE +
	JMP textTwo
	+
	LDA textaction
	CMP #$00
	BNE +
	JMP textOne
	+
	RTS
	
	textFour:
	LDA #$03  ;;<<-- it will use the "Text 4" of your screen
	STA textVar
	LDA #$01
	STA npc_autotext
	;; activate the text-box:
	LDA gameHandler
	ORA #%00100000
	STA gameHandler
	LDA #%10000000
	STA textboxHandler
	LDA #$00
 	STA textaction
	RTS
	
	textThree:
	LDA #$02  ;;<<-- it will use the "Text 3" of your screen
	STA textVar
	LDA #$01
	STA npc_autotext
	;; activate the text-box:
	LDA gameHandler
	ORA #%00100000
	STA gameHandler
	LDA #%10000000
	STA textboxHandler
	
	LDA #$03
	STA textaction
	
	RTS
	textTwo:
	LDA #$01  ;;<<-- it will use the "Text 2" of your screen
	STA textVar
	LDA #$01
	STA npc_autotext
	;; activate the text-box:
	LDA gameHandler
	ORA #%00100000
	STA gameHandler
	LDA #%10000000
	STA textboxHandler
	
	LDA #$02
	STA textaction
	RTS
	
	textOne:
	LDA #$00  ;;<<-- it will use the "Text 1" of your screen
	STA textVar
	LDA #$01
	STA npc_autotext
	;; activate the text-box:
	LDA gameHandler
	ORA #%00100000
	STA gameHandler
	LDA #%10000000
	STA textboxHandler
	
	LDA #$01
  	STA textaction
	RTS
-----
I know... my english is not perfect
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
User avatar
Bucket Mouse
Posts: 460
Joined: Wed Mar 07, 2018 2:25 am

Re: Simple Autotext/Cutscenes [4.15]

Post by Bucket Mouse » Thu Apr 09, 2020 10:28 pm

AH! Thank you so much!
User avatar
crazygrouptrio
Posts: 126
Joined: Fri Jan 11, 2019 2:22 pm
Location: United States
Contact:

Re: Simple Autotext/Cutscenes [4.15]

Post by crazygrouptrio » Fri Apr 10, 2020 1:43 pm

dale_coop wrote:
Thu Apr 09, 2020 10:02 pm
Ok, it's a small error in the TextAction.asm script... the bug is the ">" will not work with the first Text.... on the other Texts (Text 2, 3, 4) it works.
This morning, I tested with Text 2, it' the reason it was working for me.

Here's a fixed "TextAction.asm" script:

Code: Select all

	LDA textaction
	CMP #$03
	BNE +
	JMP textFour
	+
	LDA textaction
	CMP #$02
	BNE +
	JMP textThree
	+
	LDA textaction
	CMP #$01
	BNE +
	JMP textTwo
	+
	LDA textaction
	CMP #$00
	BNE +
	JMP textOne
	+
	RTS
	
	textFour:
	LDA #$03  ;;<<-- it will use the "Text 4" of your screen
	STA textVar
	LDA #$01
	STA npc_autotext
	;; activate the text-box:
	LDA gameHandler
	ORA #%00100000
	STA gameHandler
	LDA #%10000000
	STA textboxHandler
	LDA #$00
 	STA textaction
	RTS
	
	textThree:
	LDA #$02  ;;<<-- it will use the "Text 3" of your screen
	STA textVar
	LDA #$01
	STA npc_autotext
	;; activate the text-box:
	LDA gameHandler
	ORA #%00100000
	STA gameHandler
	LDA #%10000000
	STA textboxHandler
	
	LDA #$03
	STA textaction
	
	RTS
	textTwo:
	LDA #$01  ;;<<-- it will use the "Text 2" of your screen
	STA textVar
	LDA #$01
	STA npc_autotext
	;; activate the text-box:
	LDA gameHandler
	ORA #%00100000
	STA gameHandler
	LDA #%10000000
	STA textboxHandler
	
	LDA #$02
	STA textaction
	RTS
	
	textOne:
	LDA #$00  ;;<<-- it will use the "Text 1" of your screen
	STA textVar
	LDA #$01
	STA npc_autotext
	;; activate the text-box:
	LDA gameHandler
	ORA #%00100000
	STA gameHandler
	LDA #%10000000
	STA textboxHandler
	
	LDA #$01
  	STA textaction
	RTS
Thanks for the fix Dale! I'll update the tutorial to reflect this.
The Games I've Made/Am Making:
Shera & The 40 Thieves
Mawthorne: Ancient Quest
Afterlight
Raid or Die!
User avatar
dale_coop
Posts: 5752
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Simple Autotext/Cutscenes [4.15]

Post by dale_coop » Fri Apr 10, 2020 2:27 pm

My pleasure <3
-----
I know... my english is not perfect
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
Post Reply