hi there
you could do something like this:
Code:
var green = 128;
var blue = 128;
var red = 128;
function turn_it_on()
{
if(interruptor_pushed == true)
{
light_bulb.lightrange = 300;
}
else
{
light_bulb.lightrange = 0;
}
while (1)
{
my.lightgreen = green;
my.lightred = red;
my.lightblue = blue;
wait (1);
}
}
action light_bulb
{
light_bulb = me;
light_bulb.passable = on;
light_bulb.invisible = on;
turn_it_on();
}
you could also increment lightrange step by step to get a dim effect