Author Topic: Recoloring an item via scripts to match paint color?  (Read 1146 times)

title  is a bit self explanitory but here it is in a nutshell, i am looking to make a weapon recolorable through scripts i have tried a few methods with no sucess, in an ideal world the items would change to match paintcan color...

i have tried...

Code: [Select]
%color = getColorIDTable(%client.currentColor);
%obj.setNodeColor(ALL,%color);
(code modifyed from ski's scripts)

and
Code: [Select]
  doColorShift = true;
   colorShiftColor = %color;

with no seccess...

im just wondering if its even possable, and i believe it is.

Or should be atleast and i saw somewhere that spaceguy has accomplished this for a flag ctf item or somthing...  also this http://forum.blockland.us/index.php?topic=66176.0
« Last Edit: April 26, 2014, 07:44:52 PM by zombekillz »

Not possible to change a weapon's color like that.

The reason skis can change color is because they are apart of the player model, and only show when using skis. The ski node on the player is able to change colors, and hide or unhide. thats why when you unhide all player's nodes, you can see ski's.

Your best bet is to make a script that makes a weapon image datablock for ALL the paint colors, and mount the specific one according to paint color. Its a terrible idea anyway.
« Last Edit: April 23, 2014, 10:49:45 PM by Wrapperup »

Look at Slayer's CTF gamemode to see how its done.

Look at Slayer's CTF gamemode to see how its done.

Yep. I create datablocks for a set amount of colors (usually 10, resulting in 20 datablocks) and then choose the closest one to what I need.

ouch, that's sad, will defiantly not be adding more datablockks than needed,  locking :P