Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Item Animations
#1
Another quick thing, I'm just in a tutorial mood.
there's probably a much better way to do this, but whatever works.

Find:

Code:
' Index of actual player
Public MyIndex As Long

And add:
Code:
Public ItemAnim As Byte

There? good.
Now lets hit up the map animation timer, search for:
Code:
Change map animation every 250 milliseconds

And add:

Code:
ItemAnim = ItemAnim + 1
            If ItemAnim = 3 Then
                ItemAnim = 0
            End If

Somewhere before the: MapAnimTimer = GetTickCount

Done? Almost there then, head over to BltItem, in the With rec

Now change:
Code:
.Left = 0

To:
Code:
.Left = ItemAnim * 32

Obviously for ever animation frame you want, add +1 to the 'If ItemAnim = 3 Then' line.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)