Discussion in 'Engineering & Reverse Engineering' started by Tweaker, May 29, 2008.
Following what Nineko said, how would I keep the player vulnerable in the first few frames?
$FE at the start of the animation tells the animation handler (for Sonic only) to do some special code for handling the rolling animation's speed, since it's meant to be based on Sonic's speed. $FF handles walking/running and $FD handles pushing.
Otherwise, values $00-$7F are used for just the animation speed.
If the timer (the first byte) is negative (from 80 to FF) then the engine will treat it as a special timer circumstance which'll be controlled by Sonic's speed, either for walking, rolling or pushing. FF is for walking/running, FE is for rolling, FD is for pushing.
Anything from 80 to FC will act as an FD by default, so it's slow because the animation thinks it's dealing with a pushing circumstance, and perhaps your character isn't moving very fast.
EDIT; ninja'd, but, I have more info so we'll keep it d;
Actually yeah, my character was either standing still or running at mach speed, so I could make small changes to try to keep the anim speed consistent - I didn't want the curl in, curl out parts to be too short because the point of it is to make attacking harder. So if FE isn't at the start, it won't run SAnim_RollJump? Is there a way to run the jump code halfway through the animation and end it later on for uncurling? Also, how exactly WOULD one keep the speed consistent?
A quick note but if you want only certain frames of an animation to be recognised, go to Touch_Enemy and rebranch the animation according to $1A or $1B instead of $1C. $1A is for individual frames in the character file, $1B is for frames in the animation in particular.
A lot of people have homing attacks in their hacks, and I already know how to implement them. But in Sonic and the Mystic Gems, there is a cursor object that overlaps the target. How do you get an object to follow and overlap another?
By setting its position to the same value as the other object's.
AppleSauce, are you talking about a target object?
I don't quite understand, you said to rebranch the animation to 1B or 1A instead of 1C, but 1C is nowhere in Touch_Enemy. Could you provide an example?
Oh wait, which game are you using? If it's Sonic 2 it might have been relabelled to anim, in which case $1A is mapping_frame and $1B is anim_frame.
I'm using the Sonic 1 Hivebrain ASM68K disasm, but I might switch to ReadySonic SVN.
Hi again, just a little enquiry: If I wanted a lightspeed dash in my game, would the code be the same, but locking on to rings with a different animation?
Thanks, I was worried I might need to learn a whole bunch of new stuff.
You cannot just use homing attack as is, there will need to be some slight adjustments if they want it to function as a lightspeed dash. It's not as simple as changing the object check to look for rings.
Then again, I have no clue what their routine looks like... But when I tried to pull this off, it effectively did nothing if it was looking for the ring object.
I mean, that's literally what I did in Sonic 2 Adventure Edition, the main part of the code looks very similar.
Sonic 2 and 3 don't use regular objects for rings, save for a few exceptions. (Rings placed through debug mode being one.)
Hi, I'm working with control lock in Sonic 2 but it appears to be causing some weird issues.
One it seems like the controls tapped when initiating control lock are held until it is undone which can cause some weird interruptions (you hold down the player sometimes rolls or you hold A they jump, even after you've let go and the automated action is trying to run).
And two it appears that control lock has problems working for one player when two players are onscreen.
Are there any details that need to be put in here to make it work more cleanly for one player?
Ah, I think I know what I need to do.
But all that aside, this is probably the best use of a meme I've ever seen.
Okay I've a better specific. It seems one problem with control_lock. It seems with a move I've implemented for Tails using it, when the game is Sonic and Tails mode, it control locks Sonic instead. Any idea how to switch this to player 2?
Separate names with a comma.