Page 1 of 1

Random flashing Colors

Posted: Fri Aug 01, 2003 4:47 pm
by Zell
is it possible to make a pad that flashes diffrent colors or random colors with a flip of a swicth?
any help is appreciated

zell

Posted: Fri Aug 01, 2003 5:40 pm
by Kappes Buur
You could include a script which changes the colour of a sector by using the special:

Sector_SetColor (Sid, red, green, blue)

and setting the time intervals for the colour change:

delay(random(lo_tics_limit, hi_tics_limit)*multiplier)

entering appropriate values, of course.

Posted: Fri Aug 01, 2003 8:03 pm
by Zell
any way to loop it? lol sry i have no clue on how to do that =p

Posted: Fri Aug 01, 2003 8:22 pm
by cccp_leha
Use "restart;" at the end of the script, it's kinda the same thing you'd do for sparks. lol I did an infinite loop for that once, but that didn't work.

Posted: Sat Aug 02, 2003 4:29 am
by Kappes Buur
I made a small map with four sectors, which I tagged 1, 2, 3, 4. Then I added this script:

Code: Select all

#include "zcommon.acs"

script 10 open
{
Sector_SetColor (1, 255, 0, 0);
Sector_SetColor (2, 255, 255, 255);
Sector_SetColor (3, 255, 128, 0);
Sector_SetColor (4, 128, 255, 255);
delay(random(1, 15));

Sector_SetColor (1, 0, 255, 0);
Sector_SetColor (4, 255, 0, 0);
delay(random(1, 15));

Sector_SetColor (2, 0, 0, 0);
Sector_SetColor (3, 255, 255, 0);
Sector_SetColor (4, 255, 0, 255);
delay(random(1, 15));

Sector_SetColor (1, 0, 0, 255);
Sector_SetColor (2, 255, 0, 0);
delay(random(1, 15));

restart;
}
Granted, it is rather simple. But it shows you how it can be done.