AnimTime()?

Blitz3D Forums/Blitz3D Programming/AnimTime()?

mearrin69(Posted 2004) [#1]
Hi all,
How does AnimTime() work? I would have thought it would return the current frame, which doesn't seem likely since the manual says it returns a float. So, how can I get the current frame number of an animating model?

I want to do something like:

If {currentmodelframenumber} = 79 then
     {do this thing}
elseif {currentmodelframenumber) = 80 then
     {do this other thing}
else
     {just hang about}
endif


So, is there a function for {currentmodelframenumber} or a way I can use AnimTime() to get to that same result?
Any help much appreciated!
M


Tom(Posted 2004) [#2]
The Float value indicates where the animation is at in the current sequence and takes into account interpolation.

0.7 would be 70% between frame 0 and 1

5.7 would be 70% between frame 5 and 6

e.t.c

Use Int(AnimTime(Entity)) to get the nearest actual frame.

Cya!
Tom


mearrin69(Posted 2004) [#3]
Ah, thanks! I almost had it. Didn't realize it started over again for each animation sequence.
M