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
Elevator an_elevator  

an_elevator

an elevator.lsl

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

the Zip file

Download all files for an_elevator
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. an_elevator_1.lsl
1
2 vector pos;//Base Postion
3 vector end;//Target Position
4 key owner;
5 default
6 {
8 {
9 owner=llGetOwner();
10 llListen(0,"",owner,"");
11 llListen(34,"","","first");
12 llListen(34,"","","second");
13 llSetStatus(STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z,FALSE);
14 }
15
16 listen(integer a, string n, key id, string m)
17 {
18 // When the object hears align, it will grab the base position, and after which, all moves will be made by adjusting the z-coordinate of the base position.
19 if(m=="align")
20 {
21 pos=llGetPos();
23 llMoveToTarget(pos,1.5);
24 }
25
26 // For the first floor, we want the elevator to be at its base position, so end(final resting place of the elevator) is the same as pos. I showed the addition of the vector <0,0,0> merely for continuity. The same comments about tau that apply to the llSetHoverHeight, apply to llMoveTarget.
27 if(m=="first")
28 {
29 end=pos;
30 llMoveToTarget(end,1.5);
31 }
32
33 if(m=="second")
34 {
35 end=pos+<0,0,3.29>;
36 llMoveToTarget(end,1.5);
37 }
38
39 }
40 }
41 // END //

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