TGEA 1.07 animated object issue
by DreamPharaoh · in Torque Game Engine Advanced · 03/23/2008 (12:07 am) · 3 replies
This works in TGEA 1.5 but does not work with the beta version. It will load up the catagory of plants but will not allow it to load into the game. Here is the code I am using. Thank you for any direction on this.
____________Code___________
datablock TSShapeConstructor(PodyamePlant2Dts)
{
category = "Plants";
baseShape = "~/data/shapes/plants/PodyamePlant2.dts";
//sequence0 = "~/data/shapes/plants/Action.dsq Action";
};
function TSShapeConstructor::onAdd(%this,%obj)
{
%obj.playThread(0,"Action");
}
function TSShapeConstructor::create(%block)
{
%obj = new StaticShape()
{
dataBlock = %block;
};
return(%obj);
}
____________Code___________
datablock TSShapeConstructor(PodyamePlant2Dts)
{
category = "Plants";
baseShape = "~/data/shapes/plants/PodyamePlant2.dts";
//sequence0 = "~/data/shapes/plants/Action.dsq Action";
};
function TSShapeConstructor::onAdd(%this,%obj)
{
%obj.playThread(0,"Action");
}
function TSShapeConstructor::create(%block)
{
%obj = new StaticShape()
{
dataBlock = %block;
};
return(%obj);
}
About the author
If you want to learn more, please go to my website. GodsandNemesis.com.
#2
Tried to get the object for item 69, which is not InspectorData!
Object 'PodyamePlant2Dts' is not a member of the 'GameBaseData' data block class
scriptsAndAssets/server/scripts/podyame.cs (16): Register object failed for object (null) of class StaticShape.
Tried to get the object for item 69, which is not InspectorData!
Tried to get the object for item 73, which is not InspectorData!
Tried to get the object for item 73, which is not InspectorData!
03/23/2008 (10:02 am)
Sorry about that. Here is the error from the console. It allows the weapons and other objects to load without a problem so I will see if there is some type of conversion needed. They probably changed a few function-names. Any ideas please let me know.Tried to get the object for item 69, which is not InspectorData!
Object 'PodyamePlant2Dts' is not a member of the 'GameBaseData' data block class
scriptsAndAssets/server/scripts/podyame.cs (16): Register object failed for object (null) of class StaticShape.
Tried to get the object for item 69, which is not InspectorData!
Tried to get the object for item 73, which is not InspectorData!
Tried to get the object for item 73, which is not InspectorData!
#3
_______________________________________________
datablock StaticShapeData(PodyamePlant2Dts)
{
category = "Plants";
shapeFile = "~/data/shapes/Plants/PodyamePlant2.dts";
sequence0 = "~/data/shapes/Plants/Action.dsq Action";
};
function PodyamePlant2Dts::onAdd(%this,%obj)
{
%obj.playThread(0,"Action");
}
function StaticShapeData::create(%block)
{
%obj = new StaticShape()
{
dataBlock = %block;
};
return(%obj);
}
03/23/2008 (11:34 am)
This method works, but did not work for me in version 1.5, oh well. I hope this helps someone else._______________________________________________
datablock StaticShapeData(PodyamePlant2Dts)
{
category = "Plants";
shapeFile = "~/data/shapes/Plants/PodyamePlant2.dts";
sequence0 = "~/data/shapes/Plants/Action.dsq Action";
};
function PodyamePlant2Dts::onAdd(%this,%obj)
{
%obj.playThread(0,"Action");
}
function StaticShapeData::create(%block)
{
%obj = new StaticShape()
{
dataBlock = %block;
};
return(%obj);
}
Torque Owner Cinder Games