Need help with animated static mesh
by James Brad Barnette · in Torque Game Engine · 05/08/2007 (7:46 pm) · 6 replies
I have a mesh of a oil well and I have an animation of the pump moving. whe I view it in Show tool pro all is well but when I import it intot he game it is just static. How do I get it to play throught its animation and cycle.
At this point that is all I need it to do. it is a simple 120 cycle of the pump moving.
Thanks in advance.
At this point that is all I need it to do. it is a simple 120 cycle of the pump moving.
Thanks in advance.
#2
05/08/2007 (8:53 pm)
Thanks a million man
#3
05/08/2007 (10:12 pm)
Your very welcome!
#4
05/09/2007 (12:47 am)
I am not sure if things have changed but I read somewhere recently (I am still learning) that static shapes can have one animation which should be called ambient for it to play correctly, is this still the case?
#5
05/09/2007 (3:33 am)
I use static shapes with numerous animations and none of them are named ambient.
#6
05/09/2007 (3:55 am)
Yeah I have done some reading and it look like there has to be a script for it ad it has to have a exec entry in the game.cs this make it a gameBase Class and not a static mesh class. I could be wrong but that is what I got out of it. There should really be a tutorial on it.
Torque Owner Fucifer
Here example scripts.
datablock StaticShapeData(Pump) { category = "Oil Well"; shapeFile = "~/data/shapes/Oilwell/pump.dts"; }; function Pump::onAdd(%this,%obj) { %obj.playThread(0,"idle"); // change idle to name of your animation }