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 lift_elevator_by_Timeless_Montreal  

lift_elevator_by_Timeless_Montreal

lift (elevator) by Timeless Montreal.lsl

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

the Zip file

Download all files for lift_elevator_by_Timeless_Montreal
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. lift_elevator_by_Timeless_Montreal_1.lsl
1
2 //********************************************************
3 //This Script was pulled out for you by YadNi Monde from the SL FORUMS at http://forums.secondlife.com/forumdisplay.php?f=15, it is intended to stay FREE by it s author(s) and all the comments here in ORANGE must NOT be deleted. They include notes on how to use it and no help will be provided either by YadNi Monde or it s Author(s). IF YOU DO NOT AGREE WITH THIS JUST DONT USE!!!
4 //********************************************************
5
6
7
8
9
10
11
12 // lift (elevator) by Timeless Montreal
13 //Well, this is the first script that I have written that I think might be worth something to someone else. There isn't much to it, but I was trying to figure out a creative way to get from one level to the next with out walking. I hope you like it, and I am sorry if it is already out there and I missed it.
14
15
16
17
18 // lift script, v 1.0 by timeless montreal
19 //
20 // This script will allow you to make any prim a lift or an elevator.
21 // You should only have to change the liftAmount to the distance
22 // you want the lift to move. Of course, if you rather it move
23 // side to side, it shouldn't be too hard to tweak.
24 //
25 // enjoy!
26
27 integer liftAmount = 4; // change this to the amount you
28 // want to go up/down
29
30 integer isUp = FALSE; // Stores whether the object is up
31
32
33 movePlatform(){
34 llStartAnimation("stand");
35 if(isUp == FALSE){
36 llSetPos(llGetPos() + <0, 0, liftAmount>);
37 isUp = TRUE;
38 } else {
39 llSetPos(llGetPos() + <0, 0, -1*(liftAmount)>);
40 isUp = FALSE;
41 }
42 }
43
44 default
45 {
47 {
48 llSitTarget(<0,0,1>,<0,0,0,1>);
49 llSetSitText("Lift");
50 }
51
52
53 changed(integer change)
54 {
55 if(change & CHANGED_LINK)
56 {
57 key avataronsittarget = llAvatarOnSitTarget();
58 if( avataronsittarget != NULL_KEY )
59 {
61 llStopAnimation("sit");
62 movePlatform();
63 } else {
65 }
66 }
67 }
68 }
69
70
72 {
73 if(perm)
74 {
75 // Place the code here!
76 llStopAnimation("sit");
77 movePlatform();
78 }
79 }
80 } // END //

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