How would you make the left side of the screen solid

Logana

Well-known member
I just wanna no to fix a bug in one of my games I’ve tried moving all of the screen transition data to adventure and rpgs or other game styles and it still won’t fix it so I need to find a way to make the edge screen hit script move stop you when you hit left and transition when you hit right
 

dale_coop

Moderator
Staff member
You could try modifying the "updateScreenAtEdge.asm" script assigned to the "Edge Reaction 1" element in your "Project Settings > Script Settings"

2020-09-28-10-23-52-Project-Settings.png


Adding this code at the very beginning:

Code:
LDA screenUpdateByte
CMP #$03	;; (00: bottom: 01: right, 02: top, 03: left)
BNE +
	;; if left edge 
	;; stop
	LDA #$00
	STA Object_x_lo,x
	STA Object_y_lo,x
	STA Object_h_speed_hi,x
	STA Object_h_speed_lo,x
	STA Object_v_speed_hi,x
	STA Object_v_speed_lo,x
	STA xHold_lo
	STA yHold_lo
	LDA xPrev
	STA Object_x_hi,x
	STA xHold_hi
	LDA yPrev
	STA Object_y_hi,x
	STA yHold_hi
	LDA currentNametable
	JMP notHandlingLeftBounds
+

Now your player should stops instead of change screen, when he goes to the left bounds.

Note: the good practice should be to save that script as a different name... and assign that new script to your "Edge Reaction 1" script element.
 

Logana

Well-known member
Yeah I have a folder for all the new scripts I use that weren’t originaly in nesmaker to begin with :) also thanks For the code,
 
Top Bottom