Banner
Views: 863,591,414
Time:
22 users online:  Anorakun, CalHal, codfish1002, Dark Prince, Drakel, Edidoo, Eduard,  Falconpunch, floppingcheepcheep, Fullcannon, Ginji23, GiraffeKiller, Jikurein, JX444444, kaigem, Knight of Time, lion, ModernKiwi, olgdeldnem, quietmason, Raymondsze, TickTockClock - Guests: 97 - Bots: 94 Users: 47,795 (2,069 active)
Latest: Ginji23
Tip: If you give the player a cape, be sure they can't cheat and fly over the level with it!Not logged in.
I'm making screen scrolling doors, but I'm a noob and require guidance
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - I'm making screen scrolling doors, but I'm a noob and require guidance
Pages: « 1 »
I'm trying to make screen scrolling doors similar to GHB's screen scrolling pipes.I got it to work pretty much how i want it to, but it is not user friendly in the slightest.

Basically, I have it act just like a door, except it warps your x and y position when entered. The only problem, is the x and y position is set manually. Is there anyway to make it so it warps you to the next map16 tile? This way you could just place a second door instead of re-editing the x and y position every time you place it.

Here's the code I made so far (it warps you 16 pixels right and 16 down)
Code
db $37

JMP MarioBelow : JMP MarioAbove : JMP MarioSide
JMP SpriteV : JMP SpriteH
JMP Cape : JMP Fireball
JMP MarioCorner : JMP MarioBody : JMP MarioHead
JMP WallFeet : JMP WallBody

MarioBelow:
	LDA #$25				; \ Make this block passable.
	STA $1693|!addr				; |
	LDY #$00				; /
RTL

MarioAbove:
	LDA #$25				; \ Make this block passable.
	STA $1693|!addr				; |
	LDY #$00				; /
RTL

MarioSide:
	LDA #$25				; \ Make this block passable.
	STA $1693|!addr				; |
	LDY #$00				; /
RTL

SpriteV:
	LDA #$25				; \ Make this block passable.
	STA $1693|!addr				; |
	LDY #$00				; /
RTL

SpriteH:
	LDA #$25				; \ Make this block passable.
	STA $1693|!addr				; |
	LDY #$00				; /
RTL

Cape:
	LDA #$25				; \ Make this block passable.
	STA $1693|!addr				; |
	LDY #$00				; /
RTL

Fireball:
	LDA #$25				; \ Make this block passable.
	STA $1693|!addr				; |
	LDY #$00				; /
RTL

MarioCorner:
	LDA #$25				; \ Make this block passable.
	STA $1693|!addr				; |
	LDY #$00				; /
RTL

MarioBody:
	LDA #$25				; \ Make this block passable.
	STA $1693|!addr				; |
	LDY #$00				; /
	LDA $72					; \ If the player is not in air...
	BNE Label_0000				; /
	LDA $16					; \ If the player has pressed the Up button...
	AND #$08				; |
	BEQ Label_0001				; /
	LDA #$0F				; \ Play the "door" sound effect.
	STA $1DFC|!addr				; /
	REP #$20				; \
	LDA $94					; |
	CLC					; | Change the player's x position by 16.
	ADC #$0010				; |
	STA $94					; |
	SEP #$20				; /
	REP #$20				; \
	LDA $96					; |
	CLC					; | Change the player's y position by 16.
	ADC #$0010				; |
	STA $96					; |
	SEP #$20				; /
	BRA Label_0002
Label_0001: 
	RTL					; > Exit this event.
Label_0002:					; > ----------------
Label_0000:					; > --------
RTL

MarioHead:
	LDA #$25				; \ Make this block passable.
	STA $1693|!addr				; |
	LDY #$00				; /
RTL

WallFeet:
	LDA #$25				; \ Make this block passable.
	STA $1693|!addr				; |
	LDY #$00				; /
RTL

WallBody:
	LDA #$25				; \ Make this block passable.
	STA $1693|!addr				; |
	LDY #$00				; /
RTL




print "scrolling doors test"

Any help is appreciated. I really want these doors, they would be so cool!!!! :3

EDIT:
Is there any way to set have it warp you to a set map16 tile (or the next map16 tile)? This is literally the only thing preventing these doors from working perfectly.

--------------------
who knew it would take 3 years for me to learn how to insert a custom block into lunar magic
See, GHB already made them. But of course, it requires UberASM, just like his pipes.

--------------------
My Mode 0 guide.

My Discord server. It has a lot of archived ASM stuff, so check that out!
Originally posted by AnasMario130
See, [url=https://www.smwcentral.net/?p=section&a=details&id=12638]GHB already made them.


Did i do this for nothing?! lol its fine.

--------------------
who knew it would take 3 years for me to learn how to insert a custom block into lunar magic
Nothing wrong with making your own. Consider it extra exercise. Also, your implementation could be the better one.

--------------------
HackPortsASM
thanks lion :3 yea i feel like i would prefer it if the doors warp you instantly, would also be easier to insert since no patch required.

--------------------
who knew it would take 3 years for me to learn how to insert a custom block into lunar magic
Pages: « 1 »
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - I'm making screen scrolling doors, but I'm a noob and require guidance

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2020 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy