Game Development Community

Classic animate a staticshape script not working

by Thomas Shaw · in Torque Game Engine · 11/15/2006 (7:00 pm) · 0 replies

Hello. I have a dts shape - an underwater plant, that sways back and forth nicely in TGE 1.4. Here is my script to make it do so:

datablock StaticShapeData(WaterPlant)
{
shapeFile = "~/data/cube/waterplant.dts";
category = "cube";
};


function WaterPlant::onAdd(%this,%obj)
{
%obj.playThread(0,"ambient");
}

It works; has always worked...at least in 1.4.

It DOES NOT work in 1.5.
What has changed?

In the mission creator, it shows up under "shapes" like it supposed to. However, when I click it to put it in the scene, nothing happens.

In the console, I get this message:

"Object 'WaterPlant' is not a member of the 'GameBaseData' data block class
starter.fps/server/scripts/staticShape.cs (15): Register object failed for object (null) of class"

It seems the classic "animate-a-staticshape" script no longer works in 1.5?
This is driving me nuts - I have lots of animated shapes to put into my mission!