How would you make the left side of the screen solid

Post Reply
User avatar
Logana
Posts: 426
Joined: Mon Nov 18, 2019 10:14 pm

How would you make the left side of the screen solid

Post by Logana » Fri Sep 25, 2020 9:29 pm

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
I’m currently working on platycat viewtopic.php?f=52&t=5848
A fun platform game also Monster Slayer witch is the bigger prodject viewtopic.php?f=52&t=6010
User avatar
dale_coop
Posts: 5867
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: How would you make the left side of the screen solid

Post by dale_coop » Mon Sep 28, 2020 8:28 am

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

Image

Adding this code at the very beginning:

Code: Select all

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.
-----
I know... my english is not perfect
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
User avatar
Logana
Posts: 426
Joined: Mon Nov 18, 2019 10:14 pm

Re: How would you make the left side of the screen solid

Post by Logana » Mon Sep 28, 2020 10:49 am

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,
I’m currently working on platycat viewtopic.php?f=52&t=5848
A fun platform game also Monster Slayer witch is the bigger prodject viewtopic.php?f=52&t=6010
Post Reply