Files
LSL-Scripts/FlashLamp/Object/Flash.lsl
Fred Beckhusen 6fdbbbb0a3 New scripts ro load
Signed-off-by: Fred Beckhusen <fred@mitsi.com>
2019-12-17 20:33:18 -06:00

37 lines
950 B
Plaintext

integer root = 0 ; // change to the number of a prim that you want to flash
float timeval = 0.1; //the interval between events, smaller = faster
integer counter = 0;
On() {
llSetLinkPrimitiveParamsFast(root,[PRIM_POINT_LIGHT, TRUE, <1,1,1>, 1.0, 10, .1, PRIM_FULLBRIGHT, ALL_SIDES,TRUE, PRIM_GLOW, ALL_SIDES, 1.0]);
}
Off() {
llSetLinkPrimitiveParamsFast(root,[PRIM_POINT_LIGHT, FALSE, <1,1,1>, 1.0, 10, .1, PRIM_FULLBRIGHT, ALL_SIDES,FALSE, PRIM_GLOW, ALL_SIDES, 0.0]);
}
default
{
state_entry()
{
Off();
}
touch_start(integer total_number)
{
llSetTimerEvent(timeval); // between events
}
timer()
{
if (counter == 0)
On();
else if (counter == 1)
Off();
else if (counter == 2)
On();
else if (counter >= 3) {
Off();
counter = -1;
llSetTimerEvent(0);
}
counter++;
}
}