Richter in sonic, anim troubles

Discussion in 'Discussion and Q&A Archive' started by warr1or2, Aug 26, 2012.

Thread Status:
Not open for further replies.
  1. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    as you can see his Whip only has 2 frames to the anim but it ain't suppose to.



    Code:
    
    charani_Whip: dc.b $10, $3B, $3C, $3D, $FF, $FF, $FF
    
    
    Suppose to have 3.

    It's code thus far



    Code:
    
    Richter_Whip:
    
     
    
      tst.b   ($FFFFFFFE).w						   ; is the character Sonic?
    
    			    beq	 WhipEnd
    
      tpress C,(SonicControl) ; is A, B or C pressed?
    
      beq.w WhipEnd ; if not, branch
    
    			    move.b #$24,$1C(a0)  ; use Spin Dash animation
    
      move.w #$C0,d0 ;$FD1
    
      jsr (PlaySound_Special).l
    
      addq.l #4,sp   ; avoid Sonic_Jump call
    
      ;move.b #2,$39(a0)  ; set Spin Dash flag
    
      move.w #2,$3A(a0)
    
    
    
    WhipEnd:
    
      rts
    
    

    in the video i'm using a modded Sonic_Jump code, making sure to cancel out X & Y movement

    and yes i also added the anim to Touch_Enemy to kill badniks.

    [​IMG]

    the first three frames i'm needing to work, (Taken from SonMapEd)

    somewhat the same thing happens with his Slide, except just one quick frame

    anim
    Code:
    
    charani_slide: dc.b 3, $44, $45, $46, $FF, $FF, $FF
    
    
    code

    Code:
    
    Richter_Slide:
    
      tst.b ($FFFFFFFE).w   ; is sonic
    
      bne Richter_Slide_Rts ; Branch to play DASH
    
      cmpi.b #8,$1C(a0)	  ; is Sonic rolling? - DON"T
    
      bne.s Richter_Slide_Rts  ; if no, branch
    
      btst #7,$22(a0)  ; was Jump Dash flag set?
    
      bne.s Richter_Slide_Rts  ; if yes, branch
    
      tpress C,(SonicControl) ; is A, B or C pressed?
    
      beq.w Richter_Slide_Rts  ; if not, branch
    
      bset #7,$22(a0)  ; set Jump Dash flag
    
    
    
     
    
      move.w #$A4,d0   ; play JD sound
    
      jsr (PlaySound_Special).l   ;
    
      move.w #-$800,$12(a0)  ; set Jump Dash speed
    
      btst #10,$2a(a0)  ; is sonic left?
    
      beq.s Slide_Move   ; if yes, branch
    
     
    
      move.b #$26,$20(a0) ;13, 1E  ; ++ use the spring animation
    
      bset #2,$22(a0) ;#2 $22   ; ++ clear the "jumping or rolling" flag
    
      move.w #$680,d2  ; clear Y-velocity
    
      btst #6,$22(a0)  ; is Sonic underwater?
    
      beq.s Richter_Slide_ChkShoes
    
      subi.w #$300,$10(a0)  ; set speed to $600
    
     
    
    Richter_Slide_ChkShoes:
    
      tst.b ($FFFFFE2E).w  ; does Sonic have speed shoes?
    
      beq.s Richter_Slide_ChkOrientation ; if not, branch
    
      addi.w #$200,$10(a0)  ; set speed to $B00 or $500 if underwater
    
    Richter_Slide_ChkOrientation:
    
      btst #0,$22(a0)
    
      beq.s Richter_Slide_Rts
    
      neg.w $10(a0)
    
    Slide_Move:
    
      move.b #$20,$1C(a0)  
    
      move.w #$800, $12  ; clear Y-velocity
    
    			  
    
    Richter_Slide_Rts:
    
      rts
    
    
    yes it's a modded spindash, the tst.b at the begining to make sure sonic don't use it.


    what i'm wanting him to do is just change animation for the whip, so the same can be used for Crouch_whip and Jump_Whip (which in time richter's whip would use 2 seperate tiles, cues, & mappings like it is with Tails' tails but not wanting this at the moment.)

    [/CODE]
     
  2. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    In a video from youtube, we can't count how many frames he's meant to have. The Genesis has 60 frames (or 50, whatever country you have it set on), but Youtube does a max of 30. So in this video, there's frames missing anyway.


    Anyway, to the point:



    charani_slide: dc.b 3, $44, $45, $46, $FF, $FF, $FF



    First things first, edit that 3. The first digit normally represents how fast the animation should go. The higher the number, the slower it will go. So, if you think it's going too fast, set it to 6 or something then try.


    If you're trying to make that long whip actually kill a badnik, you might want to add more to Sonic's/Richter's x_radius, so he has more of a hitting point, just make sure to put it back to normal after it's been used.
     
  3. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    I know that much already. for the whip i set to $2F and it goes slow when he's moving, however still to quick when standing still.

    i'll give that a shot, but like i said for now it's one sprite till that part's out of the way. then i can make it 2 seperate sprites so it would be more accurate (in other words, doing this will have only the whip dishing out damage and not richter's body as well) i can easily find some sonic 2 code meant for tails and his tails and mod it for richter's whip
     
  4. rika_chou

    rika_chou Adopt Member

    Joined:
    Aug 11, 2007
    Messages:
    689
    Could be wrong, but from the video it looks like the animation doesn't finish because he reverts back to walking too soon.


    Perhaps maybe there would be a whip flag that prevents him from walking again until he's done whipping.


    Again, I suck at code and am probably wrong.
     
  5. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    when moving, the whip uses all 3 frames, when stationary it uses only 1. i find this odd, but am gonna have it so only stationary he throws the whip.
     
  6. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
    The problem could be in "Sonic_Move:", more precisely this line:




    move.b #5,$1C(a0) ; use "standing" animation



    It forces Sonic to use the standing animation, because the default animation is the walking animation. So to make it short the logic is as follow: if Sonic is not walking, not rolling and he's on the ground, then he's standing. When in your hack you aren't moving, then object 01 is not walking, not rolling and is on the ground, so it uses the standing animation.
     
Thread Status:
Not open for further replies.