Language…
19 users online:  AmperSam,  Anorakun, apache,  Eden_, elegist, Fozymandias, GRIMMKIN, Heitor Porfirio, Null42, OEO6, Rykon-V73,  Saphros,  Telinc1,  Thomas, tOaO, Tulip Time Scholarship Games, underway,  yoshi3706, Zandro - Guests: 281 - Bots: 387
Users: 64,795 (2,373 active)
Latest user: mathew

SMB 2 sand block help

I downloaded the sand block from SMB2,the ones where you press the run button above them and they disappear, I'd like to make a slight edit so that you can't walk through them from left to right,it'd be solid from the sides and you'd be able to press the run button and left or the right on the d-pad to make them disappear kinda like throw blocks when there's a lot of them.
I would post the code please
Here's the code:

;; Sand Block. By ICB. Make act like Block 25

db $42

JMP MarioBelow : JMP MarioAbove : JMP MarioSide : JMP SpriteV : JMP SpriteH : JMP MarioCape : JMP MarioFireBall : JMP RETURN2 : JMP RETURN2 : JMP RETURN2

MarioAbove:
LDY #$01 ;act like tile 130
LDA #$30 ;If standing on top
STA $1693
LDA $16 ;If button
AND #$40 ;Y or X isn't pressed
BEQ RETURN2 ;return
LDA #$E4 ;Move Mario up
STA $7D ;for a second
STZ $7B ;Zero horz speed
LDA #$0A ;Show ducking while picking up
STA $1498 ;item pose
LDA #$28 ;play sound
STA $1DF9

LDA #$02 ;Generate
STA $9C ;A
JSL $00BEB0 ;blank block
%create_smoke() ;make smoke (er...sand)
RETURN2:
RTL

SpriteV:
LDY #$01 ;act like tile 130
LDA #$30 ;to sprites
STA $1693 ;that are walking on top
MarioSide:
MarioBelow:
SpriteH:
MarioCape:
MarioFireBall:
RTL

print "A SMB2-style diggable sand block."
paste the marioabove code into marioside aswell.

LDA #$E4 ;Move Mario up
STA $7D ;for a second
put a ; by these two codes. In Marioside only.
;LDA #$E4 ;Move Mario up
;STA $7D ;for a second
This message pops up when I did:

An error has been detected:
blocks/sand.asm:52: error: Label "RETURN2" redefined [RETURN2:]
Press any key to continue . . .

Here's what I did just in case:

;; Sand Block. By ICB. Make act like Block 25

db $42

JMP MarioBelow : JMP MarioAbove : JMP MarioSide : JMP SpriteV : JMP SpriteH : JMP MarioCape : JMP MarioFireBall : JMP RETURN2 : JMP RETURN2 : JMP RETURN2

MarioAbove:
LDY #$01 ;act like tile 130
LDA #$30 ;If standing on top
STA $1693
LDA $16 ;If button
AND #$40 ;Y or X isn't pressed
BEQ RETURN2 ;return
LDA #$E4 ;Move Mario up
STA $7D ;for a second
STZ $7B ;Zero horz speed
LDA #$0A ;Show ducking while picking up
STA $1498 ;item pose
LDA #$07 ;play sound
STA $1DFC

LDA #$02 ;Generate
STA $9C ;A
JSL $00BEB0 ;blank block
%create_smoke() ;make smoke (er...sand)
RETURN2:
RTL

SpriteV:
LDY #$01 ;act like tile 130
LDA #$30 ;to sprites
STA $1693 ;that are walking on top
MarioSide:
LDY #$01 ;act like tile 130
LDA #$30 ;If standing on top
STA $1693
LDA $16 ;If button
AND #$40 ;Y or X isn't pressed
BEQ RETURN2 ;return
LDA #$E4 ;Move Mario up
STA $7D ;for a second
STZ $7B ;Zero horz speed
LDA #$0A ;Show ducking while picking up
STA $1498 ;item pose
LDA #$07 ;play sound
STA $1DFC

LDA #$02 ;Generate
STA $9C ;A
JSL $00BEB0 ;blank block
%create_smoke() ;make smoke (er...sand)
RETURN2:
RTL

MarioBelow:
SpriteH:
MarioCape:
MarioFireBall:
RTL

print "A SMB2-style diggable sand block."
change return2's to return3 in marioside only.
Alright it works fine now,thanks
Yes, you're welcome.
Code
SpriteV:
LDY #$01	;act like tile 130
LDA #$30	;to sprites
STA $1693	;that are walking on top
MarioSide:

Bad idea. I recommend on placing a RTL inbetween the STA $1692 and "MarioSide:".
Very well,not sure what it does,but thanks for the info :)