| Blockland Forums > Modification Help |
| Restricting Chest Color |
| (1/1) |
| Deathwishez:
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: ---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"); } --- End code --- In a looping schedule and package with a trigger, I couldn't get either one to work. What am I doing wrong? |
| Space Guy:
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 |
| Deathwishez:
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. |
| Bauklotz:
--- Quote from: Deathwishez on February 05, 2011, 04:33:10 PM --- --- Code: ---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); --- End code --- --- End quote --- |
| Deathwishez:
Thanks. This thread has served its purpose. Locking... |
| Navigation |
| Message Index |