Language…
24 users online:  Alex, anonimzwx, DanMario24YT, Dennsen86, derv82, Domokun007, drkrdnk, GRIMMKIN, h.carrell, iRhyiku, Joaokk19990, Maniek, Maw, Metal-Yoshi94, Nayfal,  NopeContest, Red2010, Serena, ShadowMistressYuko, Silver_Revolver, sinseiga, steelsburg, Tulip Time Scholarship Games, yno14jax - Guests: 295 - Bots: 431
Users: 64,795 (2,374 active)
Latest user: mathew

Sprite ASM Problem!

I have a sprite that i found in the sprites section that works fine, but i need help making adjustments.

1: How can I make the sprite activate the blue p-switch when it has 3 health left?

2: How can I make it Invincible to being killed by a block? (like if its standing on a block and Mario hits it from below)

3: Make it end the level when it dies?

4: Make it never run or fall off the screen

and last,

5: It lays on the ground for a while after yo hit it, but you can still hurt it when it's laying down. How can I make it so that when it's laying down, you can't jump on it until it's back up. Also so you get hurt if you do do that.

Here's the code:

MaxxEdit: Post this externally.
Your layout has been removed.
First off, how much experience do you have with ASM? Some of these things could be moderately easy, but most will require some decent knowledge.

If you don't know much ASM, this might be better suited in requests, or you could try learning by making your own sprite first.
1: How can I make the sprite activate the blue p-switch when it has 3 health left?

You must be disassemble blue p-switch's code. And change the sprite's speed.



2: How can I make it Invincible to being killed by a block? (like if its standing on a block and Mario hits it from below)
Code
JSL $F5B7

This is kill mario code. This code should not practice one more time.

Below Offset : -1
Above Offset : 0
Sides Offset : -1
Spr UD Offset : -1
Spr LR Offset : -1
Cape Offset : -1
Fireball Offset: -1
Reloc Offset : -1

This is block's set.


3: Make it end the level when it dies?
Furcate sprite dieing flag.
This is level end code.

Code
LDA #$FF;
STA $7E1493;

The $7E:1493 is level end counter. So, this code should not practice one more time too.




4: Make it never run or fall off the screen

I can't understand what are you talking about.



5: It lays on the ground for a while after yo hit it, but you can still hurt it when it's laying down. How can I make it so that when it's laying down, you can't jump on it until it's back up. Also so you get hurt if you do do that.

I can't this. Sorry

--
I can't speak English very well. Therefore, I think you would be frustrated talking to me.
Here is the code. I don't know very much at all =( but I could try to learn(but to me it all seems like random #'s and symbols, and a lot of $.) I guess if you know what you are doing, then you obviously know what your doing. =)

Roy edit: whoa
Your layout has been removed.
Please, don't post the entire sprite here directly. Upload the .txt to the file bin (on the menu to the right, there's a "My Files" link. Click it.) and link us to it.
1) See these four lines?

INC $C2,x
LDA $C2,x
CMP #$06
BEQ KILL

Replace them with this:

INC $C2,x
LDA $C2,x
CMP #$06
BEQ KILL
CMP #$03
BNE NoSwitch
LDA $1534,x
BNE NoSwitch
LDA #$0E
STA $1DFB
LDA #$B0
STA $14AD
INC $1534,x
NoSwitch:

(Have I ever mentioned I hate it when people write opcodes in lowercase?) That should work.

2) There is a Tweaker bit that does that, although it doesn't always work. Open up the sprite's .cfg file in a .cfg editor. See where it says "167A"? Check the second checkbox. The number above that list should increase by 2. Setting bit 1 of $167A,x like that should make the sprite invincible to the cape, fireballs, the star, and block bounces. Of course, if you want invincibility only to block bounces, I'm not sure how to do that.

3) Replace these lines:

KILL:
LDA #$02 ; \
STA $14C8,x ; /
RTS

with this:

KILL:

LDA #$02
STA $14C8,x
LDA #$FF
STA $1493
DEC $13C6
LDA #$0B
STA $1DFB
RTS

If you don't want the player to halt motion when the level ends, remove the DEC $13C6. If you want to end the level with music other than the "boss defeated" music, change the #$0B to a different value. If you want to activate the secret exit, add

LDA #$01
STA $141C,x

somewhere in there.

4) I'm not quite sure what you mean here. Could you be a little more specific?

5) I'm not entirely sure...could these lines

lda #$05 ;set time to disable contact
sta $1570,x

be of help? Maybe you could change the 05 to a bigger number.

----------------

I'm working on a hack! Check it out here. Progress: 64/95 levels.

I will try that.

What I mean for #4 is that sometimes it runs off screen (even though there is only 1 screen) and dies. Also, If you move away so that you can't see it's starting position, It respawns!! Thanks for the help!
Your layout has been removed.