Game Development Community

2dShape3d tutorial

by KIM GENTRY · in Torque Game Builder · 05/22/2007 (12:09 pm) · 5 replies

Per the t2dShape3d tutorial I added these 2 line to the end of the startGame function. Although the tutorial didn't specify where to add them.

%shape = new t2dShape3D() { scenegraph = t2dScene; };
%shape.setShape("./models/reinstatedsoldier.dts");


I used a breakpoint and determined that the call to setShape gives the following error.

TorqueGameBuilder\games\tools\levelEditor\scripts\levelManagement.ed.cs does not exist

I'm using TGB 1.1.3 and Windows Xp Home Edition ver 5.1

#1
05/23/2007 (6:42 pm)
That error makes no sense for what your doing.
- What does the console log have?
- If your dts is in your game folder, then when you load your project in the editor, does that model show up as a shape to drop into the scene?

- Finally, maybe its where your trying to load from in script. So, I will assume your folder structure is something like:
c:\torquebuilder1.3\games\YOURGAME\data\models\reinstatedsoldier.dts,
then try this:
"~/data/models/reinstatedsoldier.dts"
#2
05/24/2007 (7:56 am)
Thanks for reply.....

Yes, it always bothered me that nothing is showing up under 3D shapes on TGb editor.

I copied all the reinstatesolder files with extensions dts, dtq, and png to this directory.

C:\Program Files\TorqueGameBuilder\games\playpen\data\models

playpen is my game directory and nothing shows up under 3D shapes in TGB editor . Could that be the problem? There was no models directory under data ....so I created one.
#3
05/24/2007 (8:37 am)
It seems that there was a post a short while back that dts's were commented out of the check in the editor but could be loaded in datablocks manually.
#4
05/24/2007 (8:53 am)
I am just getting started with TGB and I really don't understand that last post.

Also what does ~/ mean. I know what ./ means and ../ but I don't know what ~/ means.
#5
05/31/2007 (10:19 am)
~/ means your root project directory...