Extra slash in path when adding new shapes
by Joe Rossi · in Torque Game Builder · 09/25/2007 (12:16 pm) · 1 replies
I added a new shape to TGB. The model was in a folder that was inside the "shapes" folder. (shapes/FreeLichModel ).
When I saved my level, the .t2d file showed this:
When I removed that extra slash, my shape showed up in the game. But every time I saved the level the slash came back. I'm thinking this could be a (tiny) bug. I am using the latest version of TGB 1.5.
To fix it, I went into
tools\levelEditor\scripts\forms\objectLibrary\ThreeDShapes.ed.cs
and changed line 51 to the following:
When I saved my level, the .t2d file showed this:
new t2dShape3D(lich1) {
[b] note the extra slash in front of the directory name [/b]
shape = "C:/Work/code/games/engines/tgb/games/RPG/game/data/shapes//FreeLichModel/Lich.dts";
intraDetailLevel = "0";
shapeRotation = "0 0 -1.90241";
canSaveDynamicFields = "1";
superclass = "BattleObject";
useMouseEvents = "1";
Position = "-31.200 21.544";
size = "12.400 10.537";
Layer = "10";
mountID = "27";
};When I removed that extra slash, my shape showed up in the game. But every time I saved the level the slash came back. I'm thinking this could be a (tiny) bug. I am using the latest version of TGB 1.5.
To fix it, I went into
tools\levelEditor\scripts\forms\objectLibrary\ThreeDShapes.ed.cs
and changed line 51 to the following:
%path = expandFileName( "^game/data/shapes" );I just removed the slash that was at the end of "shapes" here. Everything seems to work correctly now.
Torque 3D Owner Robert Blanchet Jr.