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
Vehicles Pilots_Chair_ver_1  

Pilots_Chair_ver_1

Pilot's Chair ver. 1.lsl

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

the Zip file

Download all files for Pilots_Chair_ver_1
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Pilots_Chair_ver_1_1.lsl
1
2
3
4 key avatar;
5 vector pos = <0.4,0.0,0.4>; //adjust the position to fit object -must be
6 //nonzero in at least one direction or script will not work!
7 rotation rot = ZERO_ROTATION; //adjust rotation (1 in any vector gives 90 deg)
8
9 default
10 {
12 {
13 llSitTarget(pos, rot);
14 }
15 changed(integer change)
16 {
17 avatar = llAvatarOnSitTarget();
18 if(change & CHANGED_LINK)
19 {
20 if(avatar == NULL_KEY)
21 {
22 // You have gotten off
23 llStopAnimation("sit");
26 }
27 else if(avatar == llAvatarOnSitTarget())
28 {
29 // You have gotten on
31 }
32 }
33 }
35 {
36 if(perms)
37 {
38 llStopAnimation("sit");
39 llStartAnimation("sit");
40 }
41 else
42 {
43 llUnSit(avatar);
44 }
45 }
46 }
47 // END //

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