macklebee Posted November 8, 2011 Share Posted November 8, 2011 What am I not understanding here? The animation loads and I can animate the character with it, but i am unable to pull the length of the animation. i assume I am missing some fine detail in its usage? require("scripts/class") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) local lodCount = CountModelLODEntities(model) for LODEntity = 0, lodCount-1 do sequence = LoadAnimation(GetModelLODEntity(model, LODEntity),"abstract::run.gmf") Print("Length of animation: "..AnimationLength(model,sequence)) end end Always prints the length as zero... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
macklebee Posted November 8, 2011 Author Share Posted November 8, 2011 nevermind... need to use the new LOD command... require("scripts/class") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) local lodCount = CountModelLODEntities(model) for lod = 0, lodCount-1 do sequence = LoadAnimation(GetModelLODEntity(model, lod),"abstract::run.gmf") Print("Length of animation: "..AnimationLength(GetModelLODEntity(model,lod),sequence)) end end Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.