Game Development Community

Different Player Colors

by Robert Fritzen · in Torque 3D Beginner · 09/11/2013 (2:51 pm) · 4 replies

This sounds like a really easy task, but I wouldn't be asking otherwise if it wasn't an easy task so here you go.

Lets say I've got my player model, and I have one material on it for it's color, and another for the bounds. I want this one material to be used for "all" of the different skins in the game, so basically I'm going to be creating the definitions of texture/specular/normal maps in a "material", but I want them to be controlled on the server side so the same player model (say I have 16 people in game), can have different colors. One material on the model... only.

This sounds like it should be something you should be able to do by default, but of the things I have tried so far, it doesn't appear that way. Please help!

#1
09/11/2013 (5:07 pm)
Ok, but why not use setSkinName()? That system has worked for 12 years....
#2
09/11/2013 (5:17 pm)
That one has remained quite unexplained to me in my previous attempts at asking how to use it & set it up, and then someone suggested there is a hardcoded limit to the # of "skins" a player could have, which is unacceptable to me.
#3
09/11/2013 (6:49 pm)
its not hardcoded to my knowledge.

setSkinName, the dts file has to be mapped to base.blah.png/jpg

then, you have in the folder green.blah.png/jpg blue.blah.png/jpg

%obj.setSkinName("green");
%obj.setSkinName("base");

That's literally all there is too it. :)
#4
09/11/2013 (7:00 pm)
Yeah, it still works pretty much the same way it did in Finney's books.