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
#2
If you want to animate seamlessly, without a blank space between frames, change
Code:
ItemAnim = ItemAnim + 1
            If ItemAnim = 3 Then
                ItemAnim = 0
            End If
To:
Code:
ItemAnim = ItemAnim + 1
            If ItemAnim = 2 Then
                ItemAnim = 0
            End If

Thought that might be helpful.
Reply
#3
I have three frames to my item animations.
Reply
#4
Braydok Wrote:If you want to animate seamlessly, without a blank space between frames, change
Code:
ItemAnim = ItemAnim + 1
            If ItemAnim = 3 Then
                ItemAnim = 0
            End If
To:
Code:
ItemAnim = ItemAnim + 1
            If ItemAnim = 2 Then
                ItemAnim = 0
            End If

Thought that might be helpful.

-slaps-

You just assumed he used two frames? Idiot.
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
does this make items in your inventory animated ?
Reply
#6
I don't think so, I've never used the visual inventory, so I dunno.

Although making it do so wouldn't be hard.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)