Setting colors to objects

Posts 1–15 of 18 · Page 1 of 2
Setting colors to objects
Since my last post was deleted for "spam". (more like the person it was associated with)
Here you go, this is how to change the color of textures. (works on players, vehicle, buildings, etc)
Code:
c_red 			= "#(argb,1,1,1)color(1,0,0,5)";
c_green 		= "#(argb,1,1,1)color(0,1,0,5)";
c_blue 			= "#(argb,1,1,1)color(0,0,1,5)";
c_yellow 		= "#(argb,1,1,1)color(1,1,0,1)";
c_orange 		= "#(argb,1,1,1)color(1,0.4,0.15,1)";
c_pink 			= "#(argb,1,1,1)color(1,0.5,1,1)";
c_purple 		= "#(argb,1,1,1)color(1,0,1,1)";
c_cyan 			= "#(argb,1,1,1)color(0,1,1,1)";
c_white 		= "#(argb,1,1,1)color(1,1,1,1)";
c_black 		= "#(argb,1,1,1)color(0,0,0,1)";
CustomColor 	= "#(argb,1,1,1)color(0,0,0,1)";

rainbowtest 	= 2;
rainbowTARGET 	= 2;
blueBOW 		= 2;
blueBOWTARGET 	= 2;
redSTROBE		= 2;
redSTROBETARGET	= 2;
myTargetColor 	= c_purple;
myColor 		= c_black;
ThisIsMe 		= vehicle player;
MyTarget 		= cursorTarget;

publicVariable "ThisIsMe";
publicVariable "MyTarget";
watizCOLOR2 = format ["MyTarget setobjecttexture [0,'%1'];", myTargetColor];
colorME_K 	= format ["ThisIsMe setobjecttexture [0,'%1'];", myColor];
[watizCOLOR2] execVM "path\to\re.sqf";
[colorME_K] execVM "path\to\re.sqf";
it no werk 4 me. anything im missing? i haz undetected RE
Quote Originally Posted by Jme View Post
it no werk 4 me. anything im missing? i haz undetected RE
Edit the path/to/re part to whatever the name or your RE is.
Quote Originally Posted by darkangel1 View Post
Edit the path/to/re part to whatever the name or your RE is.
lol yes, ofc i have done this. but still the script no werk 4 me.
Quote Originally Posted by Jme View Post
lol yes, ofc i have done this. but still the script no werk 4 me.

Say you want to just turn yourself or the vehicle you're in pink, you set
myColor = c_black;
to
myColor = c_pink;

If it doesn't work, your remote execution sux.
OR:
You are not in a vehicle that can be colored.
You are not in a model that can be colored.

(Hero skin)
Change into a ghille and run the script. (tez20005 got it working, and I don't think he's smarter than you.. or is he.)

All you really need is:
Code:
ThisIsMe = vehicle player;
publicVariable "ThisIsMe ";
c_red = "#(argb,1,1,1)color(1,0,0,5)";
colorME_K = format ["ThisIsMe setobjecttexture [0,'%1'];", c_red];
[colorME_K] execVM "my\fkn\re.sqf";
Quote Originally Posted by avaster View Post
Ohh... Would this work ? 0,255,127
Look at this:
CustomColor = "#(argb,1,1,1)color(1,0,1,0.2)";

Now edit color(1,0,1,0.2).
Look at it like this:
RED,GREEN,BLUE,ALPHA
dark purple:
(1,0,1,0.2)
white:
(1,1,1,1)
black:
(0,0,0,1)

If you want to change your color, in the script just set
myColor = c_black;
to
myColor = c_red
or whatever you want.
ex;
myColor = "#(argb,1,1,1)color(1,0,1,0.2)";
Quote Originally Posted by Pseudonym View Post
All you really need is:
Code:
ThisIsMe = vehicle player;
publicVariable "ThisIsMe ";
c_red = "#(argb,1,1,1)color(1,0,0,5)";
colorME_K = format ["ThisIsMe setobjecttexture [0,'%1'];", c_red];
[colorME_K] execVM "my\RE\is\better\than\yours\exec.sqf";
;
This werk

This is the USP for someone. Just getting this thread some attention to piss in their chips
i just get a pink bus!!!!!!!!!!
How do we edit the colors ?, I know you change the 1,1,1,1 But where do you get those numbers from to get the exact color you want?
Quote Originally Posted by avaster View Post
How do we edit the colors ?, I know you change the 1,1,1,1 But where do you get those numbers from to get the exact color you want?
They're RGB codes.
Ohh... Would this work ? 0,255,127
Quote Originally Posted by avaster View Post
Ohh... Would this work ? 0,255,127
yea i think it accepts in either format x/255 or 255
Doesn't work for me,and yes I did this right.
BTW does it work for busses only?
I love the script man, thanks, keep up the good work.
thanks for sharing bro
how do you make it change colors in a loop..?
Posts 1–15 of 18 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us