Language…
24 users online: crocodileman94, D1STYNCT, DanMario24YT, Dennsen86, deported, Domokun007, GamesInTweed, Green, GRIMMKIN, Gurjinter, Heitor Porfirio,  idol, Knetog, Maw, Nayfal,  Noivern, Pink Gold Peach, ppp9q, Silver_Revolver, test212,  Thomas, tOaO, VSmario90, yoshiatom - Guests: 304 - Bots: 288
Users: 64,795 (2,374 active)
Latest user: mathew

Make Custom Sprite Knowledge:The jump,spit and hit codes

Link Thread Closed
Anybody know the codes for jump,spit and and hit codes??
Anybody know??
I think need to make custom sprite,but need became this easy,but too codes is hard,anybody explain me...
What?


I do not understand your question. Could you rephrase it?

By "jump," do you mean the sprite itself jumping, or Mario jumping on the sprite?
By "spit," do you mean Yoshi spitting out an enemy?
By "hit," do you mean Mario<->Sprite collision, Sprite<->Sprite collision, Fireball/cape<->Sprite collision, or other?
JUMP sprite junping on mario
SPIT sprite spit or throwing something
Hit sprite health in custom sprites or bosses

Now understand??
Yup, much more clear.


To make a sprite "jump," you need to set the Y speed ($AA,x) upward (80-FF, 80 being really fast and FF being really slow). SMW's movement routines create a gravity effect automatically.
The hardest part is detecting when to jump. Setting the y speed in midair will cause a midair jump, which your probably do not want. Setting the Y speed always will just shoot the sprite into the air without ever coming down.


Here is a simple block of code that will make the sprite jump whenever it touches the ground.
Code
                    LDA $1588,x             ; don't set speeds if not on the ground
                    AND #$04                ;
                    BEQ NOT_ON_GND          ; 
                    LDA #$D0                ; y speed = D0
                    STA $AA,x               ;
                    NOT_ON_GND:

Making it wait before jumping will require a timer.



To make a sprite shoot another sprite, you will have to spawn a new one and set its speed. Download a shooter sprite of some sort from the sprites section and look at the code it uses to spawn sprites. That should teach you more than I can explain here.


Health is a difficult thing to do if you're just starting out. First we must know if damage can be caused by mario jumping on your sprite, by having a sprite (such as a shell) being thrown at it, or by being hit with a fireball or cape. All three things are coded quite differently.
Anybody understand to health custom sprite??
Most people will use $1528 for health. just DEC or INC to a number and when that number STZ $14C8.

Originally posted by Ixtab
Most people will use $1528,x for health. just DEC or INC to a number and when that number STZ $14C8,x.

Fixed.

Also, you'd be better off setting $14C8,x to something like 2 or 4 or just running a separate 'Death' routine when $1528,x is 0.
Now with extra girl and extra hacker
Help!!! I have lots of custom sprites, how do I put them into the game? :(
Bye...
Originally posted by Crystal Clear
Help!!! I have lots of custom sprites, how do I put them into the game? :(


You're hijacking the thread for something completely unrelated. Please refrain from doing this in the future.
Thanks.
--------> Don't follow "Find Roy's Dignity", my hack. Because it's pretty outdated. <--------
Health for custom sprite code
1 hit
2 hit
3 hit or
4 hits...

What code use??
Originally posted by Roberto zampari
Health for custom sprite code
1 hit
2 hit
3 hit or
4 hits...

What code use??

Your method of getting hewlp is rather bad...

First of all, talk in complete sentences, I can barely understand you.
Second, ASM is very difficult, asking people how to do large routines won't get your anywhere, especially with how vague your being. Try reading Iceguy's tutorial in the tutorial section.
In sprite tutorial,where should put in main routine??

;===================================
;Sprite Function
;===================================

RETURN: RTS

SpriteCode:
JSR Graphics
LDA $14C8,x ;\
CMP #$08 ; | If sprite dead,
BNE RETURN ;/ Return.
LDA $9D ;\
BNE RETURN ;/ If locked, return.

JSR SUB_OFF_SCREEN_X0 ; Handle offscreen.

LDA $1588,x
AND #$03
BEQ NoFlip
LDA $157C,x
EOR #$01
STA $157C,x
NoFlip:
LDY $157C,x
LDA XSPD,y
STA $B6,x
JSL $01802A
JSL $01A7DC
BCC skip
jsl $00f5b7
skip:
RTS
XSPD: dcb $08,$F8
I guess you're supposed to put it after the first RTL in the MAIN routine.


 
僕は今『ロックマン』のビッグアイを作っていますが、ビッグアイの動き(マリオに向かってジャンプする、ランダムで高くジャンプする)を完成させたいので、このASMファイルを見てアドバイスを下さい。

I'm currently working on Big Eye for Mega Man, and I'd like to complete Big Eye's movements (jumping towards Mario, jumping high randomly), so please take a look at this ASM File and give me some advice.

Big Eye Movement
Assatakku, please don't bump in old posts, because this post is 11 years old.


"Always be better, be respectful and kind to people".
Link Thread Closed