Mirage Source
Smoother Walking - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49)
+---- Thread: Smoother Walking (/showthread.php?tid=1424)



Smoother Walking - Rezeyu - 02-12-2007

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.


Re: Smoother Walking - Forte - 04-12-2007

not sure if it's my source being modified but this doesn't really change the walking for me


Re: Smoother Walking - Matt - 04-12-2007

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.


Re: Smoother Walking - Robin - 04-12-2007

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


Re: Smoother Walking - Matt - 04-12-2007

Guess it won't be shared then. I'm not bothering with private messages.


Re: Smoother Walking - RyanBlandin - 31-12-2007

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?


Re: Smoother Walking - Rezeyu - 31-12-2007

Then make the attacking frame frame 4.


Re: Smoother Walking - Coke - 04-01-2008

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