Language…
14 users online: BUX88, DanMario24YT, deported,  DeppySlide, Domokun007, ForthRightMC, Heitor Porfirio, hhuxy, Knight of Time, koffe190, Pizzagamer9791,  Ringo, The_Uber_Camper,  yoshi3706 - Guests: 295 - Bots: 249
Users: 64,795 (2,375 active)
Latest user: mathew

A little help here please? [SOLVED]

I have this custom boss sprite file and it can only be hit with shells.

But I want to (also/only) get hit by cape-spinning(when mario spins his cape which normally kills regular sprites), so if any one knows how they add some code that can do so, please do so for me, then i'll be very happy.

Thanks in advance, and I hope i'm not bothering anyone.
Hey y'all, Scott here!

PFP by: https://twitter.com/GinCalico (🔞 Warning)
Insert "JSR cape_interaction" before "JSL $018032" and append this to the end of the file:
Code
cape_interaction:
	LDA $14A6
	BEQ no_cape_contact

	LDA $13E9
	SEC
	SBC #$02
	STA $00
	LDA $13EA
	SBC #$00
	STA $08	
	LDA #$14
	STA $02
	LDA $13EB
	STA $01	
	LDA $13EC
	STA $09
	LDA #$10
	STA $03
	
	JSL $03B69F
	JSL $03B72B
	BCC no_cape_contact
	
	JMP HANDLE_HIT
	
no_cape_contact:
	RTS

I haven't tested it, but it should work.
Originally posted by MarioE
Insert "JSR cape_interaction" before "JSL $018032" and append this to the end of the file:
Code

I haven't tested it, but it should work.


It seems to work very well, but it also seem to have decreased my defined hit count to the default number of 3.

Is there a way to resolve this easily, or do you have to fix it.
Hey y'all, Scott here!

PFP by: https://twitter.com/GinCalico (🔞 Warning)
Oh, it appears the cape spin is hitting the boss multiple times. Try this:

Code
cape_interaction:
	LDA $14A6
	BEQ no_cape_contact
	LDA $1FE2,x
	BNE no_cape_contact

	LDA $13E9
	SEC
	SBC #$02
	STA $00
	LDA $13EA
	SBC #$00
	STA $08	
	LDA #$14
	STA $02
	LDA $13EB
	STA $01	
	LDA $13EC
	STA $09
	LDA #$10
	STA $03
	
	JSL $03B69F
	JSL $03B72B
	BCC no_cape_contact
	
	LDA #$10
	STA $1FE2,x
	
	JMP HANDLE_HIT
	
no_cape_contact:
	RTS
Originally posted by MarioE
Oh, it appears the cape spin is hitting the boss multiple times.


It's actually working now.
Thank you very much. #w{=D}
Hey y'all, Scott here!

PFP by: https://twitter.com/GinCalico (🔞 Warning)