Language…
19 users online:  AmperSam, apache, BabaYegha,  Blaagon, codfish1002, Danik2343, deported, feb31st, Fozymandias, Heitor Porfirio,  idol,  Losoall, Maw, NewPointless, saucebrune, SMW Magic,  Tahixham, TheXander,  Thomas - Guests: 305 - Bots: 385
Users: 64,795 (2,374 active)
Latest user: mathew

Need Block: Mario Pass Sprites No Pass

I need a block that allows mario to pass through, but is solid for sprites. I have no idea on how to make this. Need some help, maybe you can walk me through the process.
It's that simple:
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

SpriteV:
SpriteH:
	LDA #$30
	STA $1693
	LDY #$01

MarioBelow:
MarioAbove:
MarioSide:
Cape:
Fireball:
MarioCorner:
MarioBody:
MarioHead:
WallFeet:
WallBody:
RTL



print "A block which is solid for sprites."

If its acts like is 0x25 then Mario can pass through the block but not sprites.

By the way, since you want to learn ASM but are curious what the block does, all it does is to temporarily overwrite the acts like number you set in Lunar Magic for sprites (and only for sprites ‒ everything else is unaffected). That's done by storting the low byte (last two digits of a hexadecimal number) into $1693 and the load the high byte (here page number) into Y. The reason why the value in Y doesn't need to store anything is because of how SMW handles the acts like in the original game: Simplified to say, once the game with the original code has determined the block at a specific offset, it first stores the low byte into $1693 and then loads the high byte. The game then checks if that value was zero to determine its page number. In case of custom blocks, the game does the same process except it checks for the last value in Y before going on with the original game's code.
hey, MarioFanGamer
how do I make the block not let mario through if he is holding a sprite?


This thread is over a year and a half old. You should avoid bumping old threads, especially if you're not the original thread creator. For future reference, you should make a new thread yourself, or ask in the general help thread instead.

Still, your questions a quick answer, so I'll give this one. We actually have a block that does this already if you want an example, but the basic solution is to check both $1470 and $148F; if either are non-zero, Mario is carrying something, so change the block's acts-like setting to be solid.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
thanks so much! I forgot to look at the date for it before I asked