31-07-2006, 01:09 PM
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:
Replace if all with (Make sure not to delete the anim = 0 line, unless you remember to add it this second part):
Make sure you delete the line:
If you have 64x32 sprites (64 tall), make sure you change the sub bltplayertop stuff too.
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.