Difference between revisions of "User:Chihiro Owatatsumi"

From Second Life Wiki
Jump to navigation Jump to search
Line 2: Line 2:


:'''My BLOG''' [http://beta.slmame.com/ 放置かも - SHOP CHIHIRO] (Japanese)
:'''My BLOG''' [http://beta.slmame.com/ 放置かも - SHOP CHIHIRO] (Japanese)
Anytime I'm learning LSL, but I'm not good at a long script ^^;
<lsl>// An example of touch lamp by Chihiro Owatatsumi
default
{
    touch_start(integer total_number)
    {
        // Get Fullbright flag on the face 0
        list l=llGetPrimitiveParams([PRIM_FULLBRIGHT,0]);
        integer i=llList2Integer(l,0);
        if (i) { // Light OFF when Fullbright was TRUE
            llSetPrimitiveParams([
                PRIM_GLOW,ALL_SIDES,0,
                PRIM_FULLBRIGHT,ALL_SIDES,FALSE,
                PRIM_POINT_LIGHT,FALSE,<0,0,0>,0,0,0]);
            llWhisper(0,"OFF");
        }
        else { // Else Light ON
            llSetPrimitiveParams([
                PRIM_GLOW,ALL_SIDES,0.1,
                PRIM_FULLBRIGHT,ALL_SIDES,TRUE,
                PRIM_POINT_LIGHT,TRUE,<1,1,1>,1,10,0.75]);
            llWhisper(0,"ON");
        }
    }
}</lsl>

Revision as of 23:19, 6 November 2008

Chihiro Owatatsumi.jpg
My BLOG 放置かも - SHOP CHIHIRO (Japanese)


Anytime I'm learning LSL, but I'm not good at a long script ^^;

<lsl>// An example of touch lamp by Chihiro Owatatsumi

default {

   touch_start(integer total_number)
   {
       // Get Fullbright flag on the face 0
       list l=llGetPrimitiveParams([PRIM_FULLBRIGHT,0]);
       integer i=llList2Integer(l,0);
       if (i) { // Light OFF when Fullbright was TRUE
           llSetPrimitiveParams([
               PRIM_GLOW,ALL_SIDES,0,
               PRIM_FULLBRIGHT,ALL_SIDES,FALSE,
               PRIM_POINT_LIGHT,FALSE,<0,0,0>,0,0,0]);
           llWhisper(0,"OFF");
       }
       else { // Else Light ON
           llSetPrimitiveParams([
               PRIM_GLOW,ALL_SIDES,0.1,
               PRIM_FULLBRIGHT,ALL_SIDES,TRUE,
               PRIM_POINT_LIGHT,TRUE,<1,1,1>,1,10,0.75]);
           llWhisper(0,"ON");
       }
   }

}</lsl>