Game Development Community

DTS Material Question

by Ronald J Nelson · in Torque Game Engine · 12/05/2007 (3:37 pm) · 1 replies

What function in code can be used to get the texture/matererial/skin (you choose a name) of a dts object?

For example a function that can tell me in code the texture used to skin a vehicle.

#1
12/06/2007 (3:05 pm)
I'm not aware of one to use on Static Shapes (TSStatic) objects, but if it's a Shape (StaticShape), you can use the method getSkinName() (e.g. tree.getSkinName()). The best way to learn all available methods (which saved my life) is to open a console in-game and type:

objectname.dump();

e.g.

1515.dump();

or mytree.dump();

This tells you all available methods for the object type. When in doubt, I put an object of a given type in my mission and use dump() to tell me everything. Hope this helps.