// © FoxSan Yosuke
// Value explanation
// 25 = PRIM_GLOW
// 23 = PRIM_POINT_LIGHT
// 7 = PRIM_SIZE
// 18 = PRIM_COLOR
//
// 6c2e7ba8-50c1-4dbf-293b-377b35223c98
integer switch = TRUE;
integer count = 0;
default
{
state_entry()
{
llSetText("Test Light", <1,1,1>, 1.5);
llSay(0,"Light has been reset, sound has been preloaded.");
llTriggerSound("eac0b118-0eea-8891-e066-85bba40b7238",0.0);
}
on_rez(integer start_param)
{
llResetScript();
}
touch_start(integer total_number)
{
if (switch == FALSE)
{
switch = TRUE;
llSetPrimitiveParams ([
23, TRUE, <1, 0, 0>, 1.0, 10.0, 0.00 ,
7, <3, 3, 3> ,
18, ALL_SIDES, <1, 0, 0>,1.0 ,
25, ALL_SIDES, 1.0]);
llSay(0,"Light ON");
llSetText("ON", <1,1,1>, 1.5);
llTriggerSound("eac0b118-0eea-8891-e066-85bba40b7238",1.0);
} else if (switch == TRUE)
{
switch = FALSE;
llSetPrimitiveParams ([
23, FALSE, <1, 1, 1>, 1.0, 10.0, 0.75 ,
7, <0.5, 0.5, 0.5> ,
18, ALL_SIDES, <0, 1, 0>,1.0 ,
25, ALL_SIDES, 0.0]);
llSay(0,"Light OFF");
llSetText("OFF", <1,1,1>, 1.5);
}
}
}