macklebee Posted November 8, 2011 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
macklebee Posted November 8, 2011 Author 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
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.