Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Door BackWindow  

BackWindow

BackWindow.lsl

Category: Door
By : Anonymous
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for BackWindow
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. BackWindow_1.lsl
1
2 integer IsOpen = 0;
3 //Change this vector if you rotate the door.
4 vector offset = <-2.5, 0, 0>;
5 vector startpos;
6 vector endpos;
7 default
8 {
9 link_message(integer sender_num, integer num, string str, key id)
10 {
11 if(str=="retract1")
12 {
13 if(IsOpen == 1)
14 {
15 //startpos = llGetLocalPos();
16 //endpos = startpos + offset;
17 llPlaySound("Portal Door",1);
18 llSetPrimitiveParams([PRIM_SIZE,<1.005,0.371,3.179>]);
19 //llPlaySound("x-75canopy_latch",1);
20 //llSetPos(endpos);
21 IsOpen = 0;
22 }
23 }
24 if(str=="extend1")
25 {
26 if(IsOpen == 0)
27 {
28 //startpos = llGetLocalPos();
29 //endpos = startpos - offset;
30 llPlaySound("Portal Door",1);
31 llSetPrimitiveParams([PRIM_SIZE,<0.01,0.010,0.010>]);
32 //llSetPos(endpos);
33 IsOpen = 1;
34 }
35 }
36 }
37 }
38 // END //

Back to the Best Free Tools in Second Life and OpenSim.