Mirage Source
Item Animations - 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: Item Animations (/showthread.php?tid=1164)



Item Animations - Rezeyu - 09-08-2007

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.


Re: Item Animations - Braydok - 14-08-2007

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.


Re: Item Animations - Rezeyu - 14-08-2007

I have three frames to my item animations.


Re: Item Animations - Robin - 14-08-2007

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.


Re: Item Animations - Fabzy - 27-08-2007

does this make items in your inventory animated ?


Re: Item Animations - Rezeyu - 27-08-2007

I don't think so, I've never used the visual inventory, so I dunno.

Although making it do so wouldn't be hard.