Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Smoother Walking
#1
I made this for Grave Silence, ported it into Crimson, and a side project; but forgot to ever type it up as a tutorial.


Anyways, the current Mirage animates frames 0 and 1 for walking, and 0 for attacking.
The smoother way Perfekt/Advo had, animated 0-1-2 then back to 0.

This way animates 0-1-0-2 then abck to zero, since people's legs return the the middle before a step.

Anyways, simple C&P.

Find this in bltPlayer:
Code:
Select Case GetPlayerDir(Index)
            Case DIR_UP
                If (Player(Index).YOffset < PIC_Y / 2) Then Anim = 1
            Case DIR_DOWN
                If (Player(Index).YOffset < PIC_Y / 2 * -1) Then Anim = 1
            Case DIR_LEFT
                If (Player(Index).XOffset < PIC_Y / 2) Then Anim = 1
            Case DIR_RIGHT
                If (Player(Index).XOffset < PIC_Y / 2 * -1) Then Anim = 1
        End Select


Replace with:
Code:
Select Case GetPlayerDir(Index)
               Case DIR_UP
                   If (Player(Index).YOffset > 8) Then Anim = 1
                   If (Player(Index).YOffset > 16) Then Anim = 0
                   If (Player(Index).YOffset > 24) Then Anim = 2
               Case DIR_DOWN
                   Anim = 0
                   If (Player(Index).YOffset < -8) Then Anim = 1
                   If (Player(Index).YOffset < -16) Then Anim = 0
                   If (Player(Index).YOffset < -24) Then Anim = 2
               Case DIR_LEFT
                   Anim = 0
                   If (Player(Index).XOffset > 8) Then Anim = 1
                   If (Player(Index).XOffset > 16) Then Anim = 0
                   If (Player(Index).XOffset > 24) Then Anim = 2
               Case DIR_RIGHT
                   Anim = 0
                   If (Player(Index).XOffset < -8) Then Anim = 1
                   If (Player(Index).XOffset < -16) Then Anim = 0
                   If (Player(Index).XOffset < -24) Then Anim = 2
           End Select



And.. that's it.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)