Current frame

Blitz3D Forums/Blitz3D Beginners Area/Current frame

Alberto(Posted 2005) [#1]
Hello

Is it possible to get the current frame of an animation?

Thanks


scribbla(Posted 2005) [#2]
not that i know of...use #animtime...as a rough guess


GfK(Posted 2005) [#3]
Animtime#() will do what you require.


scribbla(Posted 2005) [#4]
it doesnt return the frame just a float on time passed on the anim

ive tried this before.. a return keyframe command would be most excellent


GfK(Posted 2005) [#5]
it doesnt return the frame just a float on time passed on the anim
You're quite wrong. It returns the frame number if the animspeed = 1. If the animspeed is less than 1 then it returns a fractional part but it is still based on the last animation frame drawn, i.e., Animate Model,1,0.1, dumping AnimTime() results to debuglog would show 1.1, 1.2, 1.3, 1.4 and so on.

In short - its based on animation frames, not time. And yeah I know, AnimTime was perhaps not the best name for this function.


Eric(Posted 2005) [#6]
Ok SetAnimTime Works Like this..

Anim#=Anim#+1.0
SetAnimTime Entity,Anim#,0
If Anim#>AnimTime(Entity) Then Anim#=1

This Will Loop Through The Frames Of your Animation.

If You Increment Anim# by Let's Say .5 Blitz will Interpolate another Frame Between Each Frame you have created.

Make any Sense?

This Assumes Anim Speed=1
Regards,
Eric


scribbla(Posted 2005) [#7]
being quite wrong is a pass time of mine;)
i see said the blind man