News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

[SM] Spawning the projectile

Started by JAM, July 25, 2014, 03:01:27 PM

Previous topic - Next topic

JAM

I have the question for the Gurus.
Does anyone know how to spawn the projectile (like when Mother Brain is hurting Samus with rainbow beam)?

I guess, there are the subroutine somewhere that should be called with:
1. Number of projectile in A.
2. X coordinate to spawn in X.
3. Y coordinate to spawn in Y.

Smiley

http://sadiztyk.metroidconstruction.com/tank/documents/smrandomroutines.txt

There are two routines (with instructions) at the bottom which spawn sprites like explosions. It also notes the routines used to spawn projectiles.

P.JBoy

Yeah, the projectile spawning routines are $868027 and $868097. The projectile pointer is held in Y and a projectile parameter is held in A; the enemy index is stored in X. The position is set by projectile AI.


JAM

Thanks a lot, guys!

SMILEuser96
Looks like I've missed these 2 subroutines in the random routines doc.

P.JBoy
This helps too!

Also, I found what I really need in the same doc. 3rd subroutine. I even have no idea to look at B4:something.

B4:BC26 creates enemy-related sprites like dud shots and hits (no sound). $12/$14 is X/Y, $16 is type. $18 is probably pallete or something... Used by Draygon for Evirs