Tuesday, December 02, 2008
USERLOGIN PASSWORD Remember?
You are here » Learning Center ยป Forums

Openlife Forums

 Openlife Grid Forums
Minimize
 
  Openlife Forums  Scripting  LSL Help  'Simple Light Script' -From previous forums.
Previous Previous
 
Next Next
New Post 2/12/2008 12:15 AM
Online now... Sakai Openlife
609 posts
openlifegrid.com
Openlife Senior




'Simple Light Script' -From previous forums. 
Modified By Sakai Openlife  on 2/12/2008 12:15:44 AM)

 

 

Koba Chen

User



Location:

Joined on:
18-Jan-2008 06:39:50
Posted:
12 posts
#Posted on: 19-Jan-2008 09:56:25.   Edit | Quoe
I use this in the lamps I sell in sl.. tried making iit in OL but it just wouldnt save


Lamp Basic


integer IS_ON = FALSE;

light() {
    llParticleSystem([
    PSYS_PART_FLAGS, 0,
    PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_DROP,
    PSYS_SRC_ANGLE_BEGIN, DEG_TO_RAD*0,
    PSYS_SRC_ANGLE_END, DEG_TO_RAD*0,
    PSYS_SRC_BURST_SPEED_MIN, 1.0,
    PSYS_SRC_BURST_SPEED_MAX, 1.0,
    PSYS_SRC_BURST_RADIUS, 0.0,
    PSYS_SRC_BURST_PART_COUNT, 1,
    PSYS_SRC_BURST_RATE, 1.0,
    PSYS_SRC_MAX_AGE, 0.0,
    PSYS_SRC_ACCEL, <0, 0, 0>,
    PSYS_SRC_TARGET_KEY, llGetKey(),
    PSYS_PART_MAX_AGE, 10.0,            
    PSYS_PART_START_SCALE, <1, 1, 0>,
    PSYS_PART_END_SCALE, <1, 1, 0>,
    PSYS_PART_START_COLOR, <1, 1, 1>,
    PSYS_PART_END_COLOR, <1, 1, 0.8>,
    PSYS_SRC_OMEGA, <0,0,0>,
    PSYS_PART_START_ALPHA, 1.0,
    PSYS_PART_END_ALPHA, 1.0
    ]);
}

stop() {
    llParticleSystem([]);    
}


default {
    state_entry() {
    }

    touch_start(integer total_number) {
        if(!IS_ON) {
            light();
            llSetPrimitiveParams([PRIM_POINT_LIGHT, TRUE, <1, 1, 1>, 1.0, 20.0, 2.0]);
            llWhisper(0, "Light On");
        } else {
            stop();
            llSetPrimitiveParams([PRIM_POINT_LIGHT, FALSE, <1, 1, 1>, 1.0, 20.0, 2.0]);
            llWhisper(0, "Light Off");
        }
        IS_ON = !IS_ON;
        llMessageLinked(LINK_SET, IS_ON, "", "ray");
    }
}
  Top

Administrator



Location:
Australia
Joined on:
2-Oct-2007 23:30:29
Posted:
403 posts
Sakai
# Posted on: 21-Jan-2008 10:12:52.  
Assuming all the commands match. Try creating a new script from inventory instead of in prim. Then Save & Drop it into the contents pane of the prim Wink

Sakai Openlife Cool

Sakai Openlife
Openlifegrid.com Founder

Exciting things are happenning!
http://openlifegrid.com
 
Previous Previous
 
Next Next
  Openlife Forums  Scripting  LSL Help  'Simple Light Script' -From previous forums.
Privacy Statement | Terms Of UseAll Rights Reserved 2007,2008 3DX - Openlifegrid.com