Page 1 of 1

Simple but useful functions - Recolor

PostPosted: Fri Oct 22, 2010 2:49 pm
by Hblade
Recoler



What It Does
This function allows you to re-color any sprite, and set the transparency of the sprite as well.

How To Use
First, place the script in Global Code. Then when you want to use it, use this command:
Code: Select all
Recolor(R, G, B, Transp);

where R is the red color, G is green, B is blue, and Transp is how see-through he is.

Correct Format:
Code: Select all
Recolor(255, 255, 255, 0);




The code:
Place this in Global Code
Code: Select all
void Recolor(int R, int G, int B, double A)
{
    r = R;
    g = G;
    b = B;
    transp = A;
}









Screenshots:
recolor.JPG

Re: Simple but useful functions - Recolor

PostPosted: Fri Oct 22, 2010 3:25 pm
by lcl
:D Nice simple code. :D

Re: Simple but useful functions - Recolor

PostPosted: Fri Oct 22, 2010 4:25 pm
by Hblade
thx :P