News:

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

Main Menu

[SM]"Sticky" Fireballs

Started by Cpt.Glitch, February 01, 2016, 05:55:39 PM

Previous topic - Next topic

Cpt.Glitch

Hello fellow hackers,
I currently know little to none about ASM. Hopefully that will change in the future. But anyhow I have a request.
I need Phantoon's fireballs so "stick" to the player after making contact and disappear a few seconds later, while also slowly draining Samus' energy while the fireball is attached. Those of you who have seen my Phantroid video will see how this will help me.

I don't really have much to offer in return as of now but if there may be something I could help you with so just ask.

Quote58

I don't have time to actually give you the code, but I'll tell you how to do it (hint: it's very easy)
So, all you have to do is get the pointer for the touch ai of the fireballs (I don't remember if they're projectiles or full enemies but either way it's not too hard to find). With that you just need to hijack the routine (put a pointer to your own code, which will eventually point to the original code), and toss in a little counter for however long you need it to stay. While it's still counting down, store samus' x/y + a constant, to the fireballs x/y (they have their own little bit of ram which includes an address for their x/y just like samus), subtract some health from samus, and end the routine instead of jumping to the original code. Once the timer is up, jump to the original code and it'll handle the disappearing for you :)

Cpt.Glitch

Hmm okay I'll see what I can do. Though like I said I know pretty much nothing about ASM/coding so I doubt I'll get very far, however I shall give it a shot.  :^_^:

Quote58

I suggest asking around in irc (specifically #cloudirc but either would probably work). If it turns out to be a projectile instead of an enemy, then ask Smiley next time he's around, he knows how they work as well. If it's just a regular enemy (ie. shows up in the smile enemy editor) then anyone who knows some asm should be able to help