Language…
13 users online: 1337doom, AbuseFreakHacker,  BeeKaay, ben15420, Gorry, Green, LadiesMan217, OrangeBronzeDaisy, playagmes169, Rykon-V73, ShoopDaWhoop, signature_steve,  YouFailMe - Guests: 281 - Bots: 542
Users: 64,795 (2,369 active)
Latest user: mathew

Explosion code for sprite and how insert this...

Anybody know the bob-omb explosion code and the place for insert the code for sprite??
This code should be what you need:

Code
	
Explode:
        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


Just place it wherever you want the sprite to explode. Or you could call the routine using JSR Explode.
Quote

LDA #$01 ; State to load
STA $14C8,x
LDA #$74 ; Sprite number
STA $9E,x
JSL $07F7D2


Basically that. Change the sprite number to that of the bob-omb and the state to that of exploding, which I think is #$08.

EDIT: ninji'd

And the code when is contect with solid object??
LDA $1588,x
BNE NotTouchingAnything

*this code runs when the sprite is touching something solid*

NotTouchingAnything:



 
I have read this thread, but i don`t know...

which is the Bob-Omb Explosion routine, without insert it in a sprite?


Hello There