Language…
10 users online:  AmperSam, Hammerer, Isikoro, JezJitzu, MorrieTheMagpie, nonamelol1, RPG Hacker, sofy lumi, timothy726, webzinn - Guests: 250 - Bots: 319
Users: 64,795 (2,377 active)
Latest user: mathew

Block offsets?

So, I want to incorporate the block that always gives a flower when hit, no matter what mario's status is. I inserted the one that comes with BlockTool and it works, but only if Mario hits it from below himself. I want it to work when a shell hits it. What would I set the offsets to to make this work? Thanks in advance.
Maybe request it.
I don't think that I'd need to request it, I mean, the block is already made; I just need to know the correct offsets to make the flower come up when I hit it with a shell.
Offsets basically work like this: "0 = run the code, -1 = don't run the code". If you want a block to work when touched by a sprite, set the sprite offset to 0.


 
When I set the offsets to 0, the rom crashes when I touch it with a shell.
Set the side offset to -1. That should fix it.

Give Mario some love?~
The side offset or the sprite Left/Right offset?
The side offset. Set that to -1.

Give Mario some love?~
So, these are my current offsets:

Below: 0
Above: -1
Sides: -1
SPR UP: 0
SPR LR: 0
Cape: 0
Fireball: -1.

Edit: Yup, crashes when I hit it from below, or if it touches with a sprite in any way.
Well... What are the offsets it originally has? 0 is usually default, but maybe the coding is weird. Just have the offsets you want it to activate under. By the way, if you didn't know, here's an explanation of what all the offset's do.

Above, or MarioAbove in .asm blocks, does what it sounds like. It runs the code from the specified spot when Mario hits the block from below. Above and Sides do the same, except for the (duh) top and sides.

SPR UP is when the block is touched on the top or bottom, I believe, with a sprite. SPR LR Does the same, except for the (duh again) sides.

Cape is just the block being hit by the cape. Fireball is just (duh2) when it get's hit by a fireball.

So, zKip was wrong, SPR LR was what was causing it to crash, not Sides.

So anyway, you said that it only activated when hit from the bottom, originally, correct? Then just take what in Below, and put it in the other options. I would only recommend Above and Sides, in addition to Below, otherwise, when I sprite hits it, you'll get a Fire Flower, which would a little awkward. Just my 3 cents.
Your layout has been removed.
Originally posted by The Witch's Assistant
Well... What are the offsets it originally has? 0 is usually default, but maybe the coding is weird. Just have the offsets you want it to activate under. By the way, if you didn't know, here's an explanation of what all the offset's do.

Above, or MarioAbove in .asm blocks, does what it sounds like. It runs the code from the specified spot when Mario hits the block from below. Above and Sides do the same, except for the (duh) top and sides.

SPR UP is when the block is touched on the top or bottom, I believe, with a sprite. SPR LR Does the same, except for the (duh again) sides.

Cape is just the block being hit by the cape. Fireball is just (duh2) when it get's hit by a fireball.

So, zKip was wrong, SPR LR was what was causing it to crash, not Sides.

So anyway, you said that it only activated when hit from the bottom, originally, correct? Then just take what in Below, and put it in the other options. I would only recommend Above and Sides, in addition to Below, otherwise, when I sprite hits it, you'll get a Fire Flower, which would a little awkward. Just my 3 cents.


Well, I'm only going to be using this block once, in a switch palace. It's going to be completely blocked off and the only way to hit it is by throwing a shell at it, so it won't be awkward at all, since no sprites'll be able to touch it. The number that was originally the below offset was 1160. I tried putting that into the sprite offsets and it still didn't work. Anyone know what "Reloc offsets" are? Because this block has a ton of stuff in there.


Edit: Played around with the spr l/r u/d offsets a little and realized that 1160 does something pretty awkward. It's pretty funny too. It makes it so that when the shell hits it, it spawns the block right over mario like Mario hit it and the flower comes up out of it. Usually results in death, too.