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 KU__Smooth_Motorbike_Script  

KU__Smooth_Motorbike_Script

KU - Smooth Motorbike Script.lsl

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

the Zip file

Download all files for KU__Smooth_Motorbike_Script
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. KU__Smooth_Motorbike_Script_1.lsl
1
2 // Original script by Cory Linden modified by Kant Usitnov //
3
4 float fSpeed = 30.0; // forward speed in meters/sec ; max is 40.0
5
6
7
8 default
9 {
11 {
12 llSetSitText("Ride");
13 llSitTarget(<0.6, 0.05, 0.20>, ZERO_ROTATION);
14 llSetCameraEyeOffset(<-5.0, 0.0, 2.0>);
15 llSetCameraAtOffset(<3.0, 0.0, 2.0>);
18 llSetVehicleFlags(VEHICLE_FLAG_NO_FLY_UP | VEHICLE_FLAG_LIMIT_ROLL_ONLY);
23
24 llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_TIMESCALE, 1.3);
27 llSetVehicleFloatParam(VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 0.2);
28
29
32
33
36
39 }
40
41 changed(integer change)
42 {
43 if(change & CHANGED_LINK)
44 {
45 key agent = llAvatarOnSitTarget();
46 if(agent)
47 {
48 if(agent != llGetOwner())
49 {
50 llSay(0, "You aren't the owner.");
51 llWhisper(0, "Right-click me, select 'more' and 'take copy'");
52 llUnSit(agent);
53 }
54 else
55 {
58 }
59 }
60 else
61 {
64 llStopAnimation("motorcycle_sit");
65 }
66 }
67
68 }
69
71 {
72 if(perm)
73 {
74 llStartAnimation("motorcycle_sit");
76 }
77 }
78 control(key id, integer level, integer edge)
79 {
80 vector angular_motor;
81
82 if(level & CONTROL_FWD)
83 {
85 }
86 if(level & CONTROL_BACK)
87 {
89 }
91 {
92 angular_motor.x += 10;
93 angular_motor.z -= 10;
94 }
96 {
97 angular_motor.x -= 10;
98 angular_motor.z += 10;
99 }
100 if(level & (CONTROL_UP))
101 {
102 angular_motor.y -= 50;
103 }
104 if(level & (CONTROL_DOWN))
105 {
106 angular_motor.y += 50;
107 }
108
110 }
111
112 }
113 // END //

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