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
#2
not sure if it's my source being modified but this doesn't really change the walking for me
Reply
#3
With permission from Robin, I can post his tut. I still have it, found it last night. It works a lot better than this method, as well as my method.
Reply
#4
You can send it to whoever you want privately, I just don't want it published on the forum.

Don't ask why... no real reason xD
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#5
Guess it won't be shared then. I'm not bothering with private messages.
Reply
#6
But if you had a special sprite for attacking that showed a sword or something wouldn't that sprite be included in the walking animation?
Reply
#7
Then make the attacking frame frame 4.
Reply
#8
I had a really simple one that just had a standing frame, walking frame and attack frame for , then a standing frame, two walking frames, and an attack frame for V and ^

Robin prolly has it, you can release mine if you want.. come to think of it, i think mine is pinched off someone else anyway xP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)