thanks for the input guys, though I am a little lost as to what the difference between these two are:
This one uses more hard scripted values am I correct?:
my.frame = distance / max_distance * 10; //max_distance = 300.
Does this one seem more flexible, because the values can be defined beforehand such as max distance?:
frameNo = (int)((float)actDist / ( (float)maxDist / (float)( frameCount - 1 ) ))+1
Why is there (float)?, sorry Ive never used float in C_Script yet.