Hey guys,
I’m got a sprite sheet of numbers that I’m using along with the AnimatedTextureExtendedUV.js from Here.
The sprite is set to a plane, that I align with my guns model to give it a halo styled ammo counter built onto the gun, like this:
Now it works perfectly, the plane runs through the animation just fine. What I’m looking to achieve is to be able to actually set the frame of the script to any frame I want, to represent how much ammo is in the weapon.
I looked at the script and the only thing that I’m getting from it is that the frame might be controlled by this:
// Calculate index
var index : int = Time.time * fps;
// Repeat when exhausting all cells
index = index % totalCells;
However, I have no clue as to how to change this to a variable that I can set. Whenever I tried, it came up with a different frame to the one I wanted.
Does anyone have any insight on this?
Many thanks!