animsec problems, help needed

BlitzMax Forums/MiniB3D Module/animsec problems, help needed

ziggy(Posted 2007) [#1]
when I use this code to load a animated mesh:

Local pers1:TMesh = LoadAnimMesh("data\pers1\dwarf1.b3d")
Local ilde1:Int = ExtractAnimSeq(pers1, 292, 325)
pers1.Animate(1,.1,ilde1)


the mesh animation doesn't go from frames 292 to 325, instead, all animation frames are shown. Any idea how to loop an animated mesh in a interval of frames, I thought it was using the ExtractAnimSeq, but it doesn't seem to work, or at last, it doesn't work the way I'm using it.


simonh(Posted 2007) [#2]
The function for ExtractAnimSeq is missing a Return statement unfortunately.

Here's the correct version:


Function ExtractAnimSeq(ent:TEntity,first_frame,last_frame,seq=0)
Return ent.ExtractAnimSeq(first_frame,last_frame,seq)
End Function


Or you can use pers1.ExtractAnimSeq(292,325) which should work.


ziggy(Posted 2007) [#3]
Thanks!