Farlas Posted August 20, 2010 Share Posted August 20, 2010 I have got a pack of 3D fish and i use one with a spline path for animation. there is something specific to do before export ? actually i select fish and export and check animation box and in gmf viewver i see the animation working but nothing in editor move So maybe name it specifically , i have take a look into the soldier example i see a soldier.gmf for the models witouht animation and other gmf file corresponding to different animation so do we need to do it if the models have only 1 animation in loop ? if someone have a little lua example of loading animation(only 1 and in loop) i take it (i don't know wich section is good cause i sak if its 3D or name specific or script so sorry if its not the good one) Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted August 20, 2010 Share Posted August 20, 2010 If your fish model is called say .. fish.gmf ( imaginative I know ) then create a .lua file called fish.lua (see the pattern? lol) in the same directory as the model .. require("scripts/class") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) function object:Render() frame = (AppTime()/35.0) % (ENDFRAME-STARTFRAME) + 1 model:Animate( frame, 1,0, 1 ) end end replace the ENDFRAME and STARTFRAME with the values for the end and start frames of the animation .. (AppTime()/35.0) Altering the denominator here (35.0) to a higher or lower value increases and decreases the animation play back... Higher = slower : Lower = Faster. (could be a few errors this is off the top of my head.) Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Farlas Posted August 20, 2010 Author Share Posted August 20, 2010 ok that what i do (take example from soldier) but not working in Leadwerks 2.4 (i have another issue with mass and physics too on my models too you put what you want in mass objects stay in air) so maybe its coming from the 2.4 i open an old backup version and my fish swim into the water and move like animate it with no change. video of animation in 2.3 HERE Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted August 20, 2010 Share Posted August 20, 2010 ok that what i do (take example from soldier) but not working in Leadwerks 2.4 Yeah, that made about as much sense as Macklebee ... you need to explain more... your mass and physics issue is more than likely you are not using the correct type of .phy file. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" 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.