Quote Originally Posted by HeroOfFire View Post
Perhaps your bug is testing the wrong combos due to bad ComboAt math?
Perhaps. I don't think you read the whole thing, though.

I'm not checking one direction per loop. If you had read on, you would've seen that I CHECK ALL FOUR DIRECTIONS, using the same variable. Also, I KNOW it starts at 0. It's SUPPOSED to! It increases according to the value of the Key counter, which I'm using for the explosive range. (That's how far the explosion reaches in 16x16 blocks. Anything in the range is hurt or killed. Or, in the case of soft blocks, destroyed.) I have it multiplied by 16 because 16 pixels is one combo. i=2 gives 32 pixels, so... It works. As for the combo I'm checking? The combo right before the one you're checking now. If it's solid and can be destroyed, stop checking for that direction. That way, the explosions can't reach behind the solid blocks. (They will if you get a Penetrating Bomb item, though- but I'll add that in once the actual destruction of the blocks is finished.)

But now that I think about it, you might be on to something about that i=0 thing. Perhaps it really IS messing things up... I'll check.

Edit: Yes, I figured it out! It was the + I was doing for left and up. That explains why I couldn't explode in those directions most of the time. Changing i=0 to i=1 also made it so no matter what, I'd be able to explode any wall if it could be blown up, if it's within range. Okay, I'm done with that part now. Time to add in the part to destroy enemies.