This is kind of pseudo-code but you should be able to get the idea... sorry for the messiness of it I haven't coded in ACS for 8 years.
Code: Select all
int red1 = 255;
int green1 = 160;
int blue1 = 64;
int red2 = 160;
int green2 = 32;
int blue2 = 16;
int fadetime = 350; // length of time (350 is 10 seconds)
for (int i = 0; i < fadetime; i++)
int red = (red1 * (fadetime - i) + red2 * i) / fadetime;
int green = (green1 * (fadetime - i) + green2 * i) / fadetime;
int blue = (blue1 * (fadetime - i) + blue2 * i) / fadetime;
Sector_SetColor(sectortag, red, green, blue);
Hopefully, someone can correct me if I got any of the ACS-specific language mechanics wrong. I wrote this in C, hoping it will work in ACS without modification. As I've said - it's been 8 years since I've used ACS.