Animated inventory items

Started by bx83, Thu 29/07/2021 11:19:48

Previous topic - Next topic

bx83

Can you, and if so, how do you make one of these?
There is an older plugin for it; but no .SetView for inventory items, and I'm not sure if it's even possible n 3.5.x?
I'm looking for the easiest way to attach a single ~10-frame loop, repeated, to an item which displays constantly when the inv window's on screen; that's all, nothing fancy.

Slasher

Have you tried the InvItemAnimation module?

bx83

Does it work in 3.5.1.8? Because it was made in 2005.

Slasher

Quote from: bx83 on Thu 29/07/2021 12:23:32
Does it work in 3.5.1.8? Because it was made in 2005.
I know It works with AGS Editor .NET (Build 3.5.0.26)

You can but try  (nod)

fernewelten

#4
I've just looked into the code (the version I have is 0.91). It seems to have been converted to the "modern" object oriented calls, so I don't see why it shouldn't work.

Its main implementation idea is to keep an internal array of views, one for each inventory item, and loop through the inventory items in each game cycle.
In each loop cycle, check whether the item should be animated. If it should, replace the inventory item "Graphic" by the appropriate frame of the appropriate view, as stored in the internal array.

In addition to the inventory image, items also have a cursor image. This is not going to animate.

It might be a good idea to arrange things so that animations only run whenever the user can see them, i.e., whenever the inventory is shown ("PauseAll()", "ResumeAll()").


SMF spam blocked by CleanTalk