Author Topic: Restricting Chest Color  (Read 1078 times)

I need to keep the chest color of a player the same as much as possible without locking down the avatar.

Needed for teams.

I tried this:
Code: [Select]
if(%client.team == 1)
{
     %team = "<color:FF0040>Red ";
     if(isobject(%client.player))
          %client.player.setShapeNameColor("1 0 0");
}

if(%client.team == 0)
{
     %team = "<color:4040FF>Blue ";
     if(isobject(%client.player))
          %client.player.setShapeNameColor("0 0 1");
}

In a looping schedule and package with a trigger, I couldn't get either one to work. What am I doing wrong?

1. It's a bad idea to use "%client.team" as it's part of some default Torque function and prevents you hearing anyone else's chat, even global chat.
2. "setShapeNameColor" is the colour of the name above your head, not your chest
3. Team Deathmatch has a "Shirt" uniform option already

1) It's a modification of another script. Nothing I can do.
2) Then why does my chest color change?
3) This isn't Team Deathmatch, sorry.

I'll also note, the color reverts back to the original color when the player's datablock changes. That's the prevention I need to make.
« Last Edit: February 05, 2011, 07:13:35 PM by Deathwishez »

Code: [Select]
if(!isObject(%pl = %cl.player))
   continue;
switch (%cl.teamID) {
   case 0: %team = "<color:FF0040>Red "; %col = "1 0 0";
   case 1: %team = "<4040FF>Blue "; %col = "0 0 1";
}
%pl.setNodeColor(chest, %col);

Thanks.

This thread has served its purpose. Locking...