Game Development Community

Static mesh animation

by James Brad Barnette · in Game Design and Creative Issues · 05/08/2007 (12:13 pm) · 1 replies

Ok I have this mesh that I have exported I can open it in showtool Pro and I can view its animation. But when I bring it into the game there is no animation. Is there some script I need to make or soemthing to make it play through its animation? I need it to just loop through it's animation cycle.

#1
05/24/2007 (9:34 am)
Heres an excerpt from some tutorials I'm working on...

If you want to drop in a shape and have it automatically start playing some animation, useful for scenery objects such as windmills or clocks, you just need to create a little script for it.
Heres the template:
datablock StaticShapeData(windmill)
   {
      shapeFile = "~/data/shapes/windmill.dts";
   };
         
function windmill::onAdd(%this,%obj)
   {
           %obj.playThread(0,"ambiant");
   }
Setting up a StaticShape datablock creates an object which can, among other things, be animated via script. First we create a very simple datablock declaration which points to a shape file, then a function which is called when the object is added to the scene which tells the object to start playing the specified animation.