Difference between revisions of "User:Chihiro Owatatsumi"

From Second Life Wiki
Jump to navigation Jump to search
(New page: '''My BLOG''' [http://beta.slmame.com/ 放置かも - SHOP CHIHIRO] (Japanese))
 
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''My BLOG'''
:[[Image:Chihiro_Owatatsumi.jpg]]
[http://beta.slmame.com/ 放置かも - SHOP CHIHIRO] (Japanese)
 
:'''My BLOG''' [http://shop-chihiro.blogspot.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>

Latest revision as of 07:28, 12 September 2009

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>