Files
LSL-Scripts/New folder/Flash.lsl
2019-02-27 14:27:09 -06:00

34 lines
854 B
Plaintext

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