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 Improved_Motorcycle  

Improved_Motorcycle

Improved Motorcycle.lsl

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

the Zip file

Download all files for Improved_Motorcycle
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Improved_Motorcycle_1.lsl
1
2 default
3 {
5 {
6 llSetSitText("Ride");
7 llSitTarget(<0.6, 0.05, 0.20>, ZERO_ROTATION);
8 llSetCameraEyeOffset(<-5.0, 0.0, 2.0>);
9 llSetCameraAtOffset(<3.0, 0.0, 2.0>);
12 llSetVehicleFlags(VEHICLE_FLAG_NO_FLY_UP | VEHICLE_FLAG_LIMIT_ROLL_ONLY);
17
18 llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_TIMESCALE, 1.0);
21 llSetVehicleFloatParam(VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 0.5);
22
23
26
27
30
33 }
34
35 changed(integer change)
36 {
37 if(change & CHANGED_LINK)
38 {
39 key agent = llAvatarOnSitTarget();
40 if(agent)
41 {
42 if(agent != llGetOwner())
43 {
44 llSay(0, "You aren't the owner");
45 llUnSit(agent);
46 llPushObject(agent, <0,0,100>, ZERO_VECTOR, FALSE);
47 }
48 else
49 {
52 }
53 }
54 else
55 {
58 llStopAnimation("motorcycle_sit");
59 }
60 }
61
62 }
63
65 {
66 if(perm)
67 {
68 llStartAnimation("motorcycle_sit");
70 }
71 }
72 control(key id, integer level, integer edge)
73 {
74 vector angular_motor;
75
76 if(level & CONTROL_FWD)
77 {
79 }
80 if(level & CONTROL_BACK)
81 {
83 }
85 {
86 angular_motor.x += 100;
87 angular_motor.z -= 100;
88 }
90 {
91 angular_motor.x -= 100;
92 angular_motor.z += 100;
93 }
94 if(level & (CONTROL_UP))
95 {
96 angular_motor.y -= 50;
97 }
98 if(level & (CONTROL_DOWN))
99 {
100 angular_motor.y += 50;
101 }
102
104 }
105
106 }
107 // END //

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