Banner
The Overworld Design Contest ends in
8 DAYS, 7 HOURS, 22 MINUTES AND 18 SECONDS
Views: 905,185,719
Time:
15 users online:  AmperSam, catboyjeremie, DanielFMonteiro, Ezel, HammerBrother, Isikoro,  KevinM, NerDose, Phyll, Rykon-V73, SkyeLondon18, Spads, Tio Ruffles, underway, WhiteYoshiEgg - Guests: 62 - Bots: 165 Users: 50,746 (2,085 active)
Latest: RayOrSomething
Tip: The lowest row of 16x16 tiles in a level do not appear, unless the "Allow viewing full bottom row of tiles" box is checked in the #lm{MARIO69} menu. Be mindful of this when designing levels!
Not logged in.
Mario Maker Bob-ombs and destroying blocks
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Mario Maker Bob-ombs and destroying blocks
Pages: « 1 » Link
Hello!

I'm using this custom sprite (https://www.smwcentral.net/?p=section&a=details&id=22331) which replicates the mario maker bob-ombs.

However I want the explosion to be able to destroy turn blocks (note that the gif on the above link shows the explosion destroying blocks), but I can't figure out how to do that.

I also tried using this ASM (https://www.smwcentral.net/?p=section&a=details&id=12428), but this only makes the default bob-omb's explosion destroy blocks.

I tried messing around with both codes, but to no avail.

Can someone help me with that?

Thanks a lot!

--- Edit ---

TheBiob helped me out on Discord, fixing the issue.
Apparently that custom sprite handles explosions in a different way.
Then, after some research on the forums, I tweaked it a little more.

The solution is as follows, in case anyone needs it:

overwrite this section:
Code
Check_Fuse:
	;; Branch away if it's not time to explode
	lda !163E,x : cmp #$01 : bne .dont_explode

	;; SFX, explode status, explode timer, normal sprie status,
	lda.b #!ExplosionSFX : sta.w !ExplosionBank|!Base2
	lda #$01 : sta !1534,x
	lda.b #!ExplosionTimer : sta !1540,x	
	lda #$08 : sta !sprite_status,x
	
	JSL $01A7DC|!BankB          ; check for Mario/sprite contact (carry set = contact)
    BCC +                       ; don't hurt Mario if no contact is made
	JSL $00F5B7|!BankB      ; hurt Mario
	+
	;; set to interact with other sprites
	lda !sprite_tweaker_1686,x : and #$F7 : sta !sprite_tweaker_1686,x
	
	;; set to default interaction
	lda !sprite_tweaker_167a,x : and #$7F : sta !sprite_tweaker_167a,x
	rts



with this

Code
Check_Fuse:
    ;; Branch away if it's not time to explode
    lda !163E,x : cmp #$01 : bne .dont_explode

    ;; SFX, explode status, explode timer, normal sprie status,
    lda.b #!ExplosionSFX : sta.w !ExplosionBank|!Base2
    lda #$01 : sta !1534,x
    lda.b #!ExplosionTimer : sta !1540,x    
    lda #$08 : sta !sprite_status,x
    
	LDA #$15
	STA $1887	; shake the ground
	LDA #$0D		;/
	STA $9E,x	;\ Sprite = Bob-omb.
	LDA #$08		;/
	STA $14C8,x	;\ Set status for new sprite.
	JSL $07F7D2	;/ Reset sprite tables (sprite becomes bob-omb)..
	LDA #$01		;\ .. and flag explosion status.
	STA $1534,x	;/
	LDA #$40		;\ Time for explosion.
	STA $1540,x
	LDA #$09		;\
	STA $1DFC	;/ Sound effect.
	LDA #$1B
	STA $167A,x
	RTS
    
    ;; set to default interaction
    lda !sprite_tweaker_167a,x : and #$7F : sta !sprite_tweaker_167a,x
    rts
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Mario Maker Bob-ombs and destroying blocks

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

Copyright © 2005 - 2021 - 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
  • sm64romhacks