Code: Select all
void AnimatedImage::Evaluate()
{
float time = GetTime()->GetValue();
int count = m_psurfaces.GetCount();
m_index = (int)(time * count) % count;
Image::Evaluate();
}Time multiplied by number of images, then with the % (Modulo) the remainder of (time*count)/count
I never was good at math, maybe you can make sense of what that actually does... I'm gonna sleep on it, it's late

