| Mirage Source http://www.miragesource.net/forums/ |
|
| Use attack frame as a walking frame (Smoother walking) http://www.miragesource.net/forums/viewtopic.php?f=210&t=340 |
Page 1 of 1 |
| Author: | Matt [ Mon Jul 31, 2006 1:09 pm ] |
| Post subject: | Use attack frame as a walking frame (Smoother walking) |
1/5 This is super easy. It uses the attacking frame, as part of the walking frames, so it makes it look more realistic, and smoother. Still can use a bit of work, like making it use the right frame when standing still, but that's something that's not hard to do, and when I get around to it, I will post the fix. ^^ As of right now though, it all works fine. Just make sure you follow this very small, very easy tut. Tut updated. Now shows the correct standing sprite for all directions. In Sub BltPlayer, find this: Code: If Player(Index).Attacking = 0 Then 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 Else If Player(Index).AttackTimer + 500 > GetTickCount Then Anim = 2 End If End If Replace if all with (Make sure not to delete the anim = 0 line, unless you remember to add it this second part): Code: If Player(Index).Attacking = 0 Then Select Case GetPlayerDir(Index) Case DIR_UP Anim = 0 If (Player(Index).YOffset < PIC_Y / 3) Then Anim = 1 ElseIf (Player(Index).YOffset > PIC_Y / 3) And ((Player(Index).YOffset > PIC_Y / 3 * 2)) Then Anim = 2 End If Case DIR_DOWN Anim = 1 If (Player(Index).YOffset < PIC_X / 4 * -1) Then Anim = 0 If (Player(Index).YOffset < PIC_X / 2 * -1) Then Anim = 2 Case DIR_LEFT Anim = 0 If (Player(Index).XOffset < PIC_Y / 3) Then Anim = 1 ElseIf (Player(Index).XOffset > PIC_Y / 3) And ((Player(Index).XOffset > PIC_Y / 3 * 2)) Then Anim = 2 End If Case DIR_RIGHT Anim = 0 If (Player(Index).XOffset < PIC_Y / 4 * -1) Then Anim = 1 If (Player(Index).XOffset < PIC_Y / 2 * -1) Then Anim = 2 End Select Else If Player(Index).AttackTimer + 500 > GetTickCount Then Anim = 2 End If End If Make sure you delete the line: Code: Anim = 0
If you have 64x32 sprites (64 tall), make sure you change the sub bltplayertop stuff too. |
|
| Author: | Gilgamesch [ Mon Jul 31, 2006 1:14 pm ] |
| Post subject: | |
pretty nice |
|
| Author: | Matt [ Tue Aug 01, 2006 4:06 am ] |
| Post subject: | |
Tut updated, now shows correct standing frame, while not moving. |
|
| Author: | Remedy [ Tue Aug 01, 2006 12:02 pm ] |
| Post subject: | |
Could you help me add 4 walking frames to my 64x96 sprites? |
|
| Author: | Matt [ Tue Aug 01, 2006 5:07 pm ] |
| Post subject: | |
Prolly not, but it would prolly just be a modification to this method, just try it and figure it out. |
|
| Author: | Coke [ Fri Aug 18, 2006 6:52 pm ] |
| Post subject: | |
Edit: hrhr, a followup on the idea of improving the movement etc system; i didnt want to hijack this thread so if anyone is interested they can refere to my request thread that can be found, http://ms.shannaracorp.com/forums/viewtopic.php?t=394 I think if my request is filled the movement/attack animation and look would be pretty much near perfect :] I tried this method you have posted and feel it can be further improved on, again - refere to my thread to see what i mean hehe ^^ |
|
| Author: | Fabzy [ Wed Apr 04, 2007 2:30 pm ] |
| Post subject: | |
Is the extra to this what fox did still around as the link he posted does not work? |
|
| Author: | Robin [ Wed Apr 04, 2007 3:19 pm ] |
| Post subject: | |
If it's a tutorial then it will appear in my tutorial backup database http://www.animerealm.co.uk/uploads/tutorials/ If not, it's lost forever. Also, an even better addition would be saving the position in a client side player variable and then programing it so you have an animation for standing still, then, when you step forward you use the first step only. When you get to the end of the tile, you stand still again and then you use the next stepping animation. Like on Pokemon and stuff for the gameboy. So it will be Square 1: Stand Still 2: Step 1 3: Standstill 4: Step 2 etc. etc. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|