Material issues with Starter.fps
by Dave D · in Torque Game Engine Advanced · 11/07/2006 (9:34 am) · 2 replies
I s there a way to get around texture names the have a ' - ' in them?
For example, TGE 1.5 have a texture called 'tall-original'.
I try t load it with:
And the error I get is
For example, TGE 1.5 have a texture called 'tall-original'.
I try t load it with:
new Material(tall-orginal)
{
mapTo = "tall-orginal.jpg";
baseTex[0] = "tall-orginal";
};And the error I get is
starter.fps/data/interiors/materials.cs (106): string always evaluates to 0.
#2
I was under the assumption they had to be the same.
11/07/2006 (9:46 am)
That did the trick. I never even though of that, thanks.I was under the assumption they had to be the same.
Torque 3D Owner J.C. Smith
new Material(tall_original) { basetex[0] = "tall-original"; };The material name doesn't have to be the same as the texture name. You could call it somethign like MatTallOrig or whatever. The - is probably throwing it off as if its (tall) minus (original). You also don't need to do the MapTo in this case.