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
Tour OpenSim Tour Car  

OpenSim Tour Car

Opensim Touring vehicle

Category: Tour
By : Ferd Frederix
Created: 2014-09-07 Edited: 2015-05-29
Worlds: Second Life

the Zip file

Download all files for OpenSim Tour Car
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Multi-vehicle script.lsl
Get file # 2. Seats.lsl
Get file # 3. vehicle script.lsl
Get file # 4. #10 prim.lsl
Get file # 5. Recorder.lsl

This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1 [20:17] Recorder Master: 10|<668.311157,14.524110,21.848991>|<0.000000,0.000000,0.000000,1.000000>
2 [20:17] Recorder Master: 20|<635.283081,13.997888,21.848991>|<0.000000,0.000000,0.000000,1.000000>
3 [20:17] Recorder Master: 30|<631.044006,14.764651,21.848991>|<0.000000,0.000000,-0.317305,0.948324>
4 [20:17] Recorder Master: 40|<626.997498,20.153231,21.848991>|<0.000000,0.000000,-0.544650,0.838663>
5 [20:17] Recorder Master: 50|<621.852173,23.064606,22.349892>|<0.000000,0.000000,-0.139210,0.990263>
6 [20:17] Recorder Master: 60|<604.187073,24.317200,23.093729>|<0.000000,0.000000,-0.043657,0.999047>
7 [20:17] Recorder Master: 70|<592.654602,25.565714,23.093729>|<0.000000,0.000000,-0.043657,0.999047>
8 [20:17] Recorder Master: 80|<586.899597,27.138906,23.533955>|<0.000000,0.000000,-0.309082,0.951035>

OpenSim Tour Car

Tour car prim for Opensim

Category: Tour
By : Ferd Frederix
Created: 2014-09-07 Edited: 2015-05-29
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2
3 integer _debug = 0;
4
5 integer REZ = 3454; // shouts Rex on this channel so a rezzer can produce another car, as this one will die
6 float INTERVAL = 0.5; // How often to check for progress
7 float TOLERANCE = 2; // how close to the destination we have to get
8 float SPEED = 5.0; // speed of vehicle
9 integer DieAtEnd = FALSE; // set to FALSE for endless loop, ser to TRUE to poof
10
11 vector TARGET = <0.0, -0.6,0.6>; // sit position on the root prim. Set this to <0,0,0> if you want to not to be able to sit on the base
12 vector ROT = <0, 0, 180>; // and the rotation, if they sit
13
14 list lCoordinate;
15 list lRotation ;
16 list lText;
17
18 // notecard reading
19 integer iIndexLines;
20 integer i;
21 string NOTECARD = "Route"; // the notecard for configuring
22
23 key kNoteCardLines; // the key of the notecard
24 key kGetIndexLines; // the key of the current line
25
26 integer count = 0;
27 vector startPos;
28 rotation startRot;
29
30 vector TargetLocation;
31 rotation TargetRotation;
32
33
34 Goto()
35 {
36 if(_debug)
37 llOwnerSay("Looking at Target Location = " + (string) TargetLocation);
38
39 vector ownPosition = llGetPos();
40 float dist = llVecDist(ownPosition, TargetLocation);
41
42 float rate = dist / SPEED;
43
44 rotation ownRotation = llGetRot();
45
46 llSetKeyframedMotion(
47 [(TargetLocation - ownPosition) + <0.0, 0.0, -.5> * TargetRotation,
48 NormRot(TargetRotation/ownRotation), rate],
49 []);
50
51
52 }
53
54 rotation NormRot(rotation Q)
55 {
56 float MagQ = llSqrt(Q.x*Q.x + Q.y*Q.y +Q.z*Q.z + Q.s*Q.s);
57
58 return
59 <Q.x/MagQ, Q.y/MagQ, Q.z/MagQ, Q.s/MagQ>;
60 }
61
62 integer locationLength;
63
64
65 string strip( string str)
66 {
67 string out;
68 integer i;
69
70 //llOwnerSay("str = " + str);
71
72 for ( ; i < llStringLength(str); i++)
73 {
74 out += llGetSubString(str,i,i);
75
76 out = llStringTrim(out, STRING_TRIM);
77 //llOwnerSay("out = " + out + " at " + (string) i);
78 }
79 return out;
80
81 }
82
83 string Getline(list Input, integer line)
84 {
85 return strip(llList2String(Input, line));
86 }
87
88
89 default
90 {
91 on_rez(integer param)
92 {
94 }
95
96 changed( integer change )
97 {
98 if(change & CHANGED_INVENTORY)
99 {
101 }
102 }
103
105 {
106 llSetLinkPrimitiveParamsFast(LINK_ROOT,
107 [PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_CONVEX,
108 PRIM_LINK_TARGET, LINK_ALL_CHILDREN,
109 PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_NONE]);
110
111 llSetCameraEyeOffset(<2, 5, 2> );
112 llSetCameraAtOffset(<0, 0, 1>);
113
114
115 rotation rot = llEuler2Rot(ROT * DEG_TO_RAD); // convert the degrees to radians, then convert that vector into a rotation, rot30x
116 llSitTarget(TARGET, rot); // where they sit
117
118
119 kNoteCardLines = llGetNumberOfNotecardLines(NOTECARD);
120 kGetIndexLines = llGetNotecardLine(NOTECARD,0);
121
122 llSay(0, "Tour guide initialising. Please wait.");
123 }
124
125 // read notecard on bootup
126 dataserver(key queryid, string data)
127 {
128 vector TempLocation;
129 if(queryid == kNoteCardLines)
130 {
131 iIndexLines = (integer) data;
132 }
133
134 if(queryid == kGetIndexLines)
135 {
136 if(data != EOF)
137 {
138 queryid = llGetNotecardLine(NOTECARD, i);
139 list lLine = (llParseString2List(data, ["|"], []));
140 if(_debug ) llOwnerSay("Line = " + llDumpList2String(lLine,":"));
141
142 TempLocation = (vector) Getline(lLine,1);
143 if(TempLocation != ZERO_VECTOR)
144 {
145 rotation Rot = (rotation) llList2String(lLine,2);
146 string text = llList2String(lLine,3);
147
148 if(_debug) llOwnerSay((string)TempLocation);
149
150 lCoordinate += [TempLocation];
151 lRotation += [Rot];
152 lText += [text];
153
154 locationLength = (llGetListLength(lCoordinate));
155 integer InitPerCent = (integer) llRound(((float) locationLength / (float) iIndexLines) * 100);
156 llSetText("Initialising... \n" + (string) InitPerCent + "%" , <1,1,1>, 1.0);
157 if(InitPerCent == 100)
158 {
159 state Paused;
160 }
161 }
162 else
163 {
164 state Paused;
165 }
166 i++;
167 }
168 kGetIndexLines = llGetNotecardLine(NOTECARD,i);
169 // (_debug ) llOwnerSay("Got " + (string) i);
170 }
171 }
172
173
175 {
176 llSetText("", <1,1,1>, 1.0);
177 TargetLocation = llList2Vector(lCoordinate, 0); // Look at 0th
178 TargetRotation = llList2Rot(lRotation, 0); // Look at 0th
179 startPos = TargetLocation;
180 startRot= TargetRotation;
181 llSetRegionPos(TargetLocation);
182 llSetRot(TargetRotation);
183 }
184 }
185
186
187 state Paused
188 {
190 {
191 llSay(0,"Ready");
192 }
193
194 link_message(integer sender,integer num,string msg, key id)
195 {
196 if(msg =="sit")
197 {
198 llSay(0,"Please stay seated. Waiting 10 seconds for a passenger");
199 llSleep(10.0);
200 llShout(REZ,"rez");
201 state moving;
202 }
203 }
204
205 on_rez(integer param)
206 {
208 }
209 changed( integer change )
210 {
211 if(change & CHANGED_INVENTORY)
212 {
214 }
215 if(change & CHANGED_LINK)
216 {
218 //llWhisper(0,"Sit by " + (string) av);
219 if(av) //evaluated as true if not NULL_KEY or invalid
220 {
221 llSay(0,"Please stay seated. Waiting 10 seconds for a passenger");
222 llSleep(10.0);
223
224 llShout(REZ,"rez");
225
226 state moving;
227 } else {
228 state end;
229 }
230 }
231 }
232 }
233
234 state moving
235 {
236
238 {
239
240 if(_debug) llOwnerSay("State Moving entered, is pointing to target " + (string) TargetLocation );
241
242 string SpeakThis = llList2String(lText, count);
243
244 if(llStringLength(SpeakThis))
245 llSay(0,SpeakThis);
246
247 llSetTimerEvent(INTERVAL);
248 }
249
250 changed(integer change)
251 {
252 if(change & CHANGED_LINK)
253 {
255 //llWhisper(0,"Sit by " + (string) av);
256 if(av) //evaluated as true if not NULL_KEY or invalid
257 {
258 //tate moving;
259 }
260 else
261 {
262 state end;
263 }
264 }
265 if(change & CHANGED_INVENTORY)
266 {
268 }
269
270 }
271
272
273 on_rez(integer param)
274 {
276 }
277
278 timer()
279 {
280
281 if(llVecMag(llGetPos() - TargetLocation) <= TOLERANCE) {
282
283 if(_debug) llOwnerSay("At location: " + (string) llGetPos());
284 count ++;
285
286 if(count >= locationLength) {
287 state end;
288 } else {
289 TargetLocation = llList2Vector(lCoordinate, count); // Look at nth
290 TargetRotation = llList2Rot(lRotation, count); // Look at nth
291 string SpeakThis = llList2String(lText, count);
292
293 if(llStringLength(SpeakThis))
294 llSay(0,SpeakThis);
295
296 Goto();
297
298 }
299 }
300
301 }
302
304 {
306 }
307
308 }
309
310
311
312 state end
313 {
315 {
316 llMessageLinked(LINK_SET,0,"DOOR OPEN","");
317
319
321 if(av) {//evaluated as true if not NULL_KEY or invalid
322 llWhisper(0, llKey2Name(av) +", please go into the hotel and check in.");
323 llUnSit(av);
324 }
325 llMessageLinked(LINK_SET,0,"unsit","");
327 }
328
329 on_rez(integer param)
330 {
332 }
333
334 timer()
335 {
337 state Paused;
338 }
339
340
342 {
343 TargetLocation = startPos;
344 TargetRotation = startRot;
345 llSetRegionPos(startPos);
346 llSetRot(TargetRotation);
347 count = 0;
348 }
349
350 }

OpenSim Tour Car

Tour Routing prim for Opensim

Category: Tour
By : Ferd Frederix
Created: 2014-09-07 Edited: 2015-05-29
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2
3 // WAYPOINT #10 PRIM SCRIPT
4 // When rezzed, does a llRegionSay on channel 300 of the word "number". Other #10 prims hear this
5 // chats 10||Description on channel 300 when it hears 'number' on 300.
6 // remembers the highest number it hears and sets the name to 10+ that number
7
8
9 integer wanted = 0;
10 integer debugger = 1;
11
12 list prims;
13
14
15 debug(string message)
16 {
17 if(debugger)
18 llOwnerSay(message);
19 }
20
21 default
22 {
24 {
25 llListen(300,"","","");
26 wanted++;
27 llRegionSay(300,"number");
28 llSetTimerEvent(5.0); // 5 seconds to hear from all prims
29 llOwnerSay("Setting coordinates");
30 }
31
32 listen(integer channel,string name, key id, string message)
33 {
34 if(message == "die")
35 llDie();
36
37 else if(message =="where")
38 llRegionSay(300,llGetObjectDesc() + "|" + (string) llGetPos() + "|" + (string) llGetRot());
39
40 else if(message =="number")
42
43 else if(wanted)
44 {
45 prims += (integer) message; // add to memory list
46 }
47
48
49 }
50
51 timer()
52 {
53 wanted = 0;
54 prims = llListSort(prims,1,0); // sort descending
55 integer num = (integer) llList2Integer(prims,0); // get highest number
56 llSetObjectDesc((string) (num + 10)); // leave room for more prims to be added
57 llSetText((string)(num + 10),<1,1,1>,1.0);
58 llOwnerSay("Desc set to " + llGetObjectDesc());
59
61 }
62
64 {
66 }
67 }

OpenSim Tour Car

Tour recordwer. Touch this after placing #10 prims

Category: Tour
By : Ferd Frederix
Created: 2014-09-07 Edited: 2015-05-29
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2
3 integer wanted = 0;
4 integer debugger =1;
5 list prims;
6
7
8 debug(string message)
9 {
10 if(debugger)
11 llOwnerSay(message);
12 }
13
14
15
16 string left(string src, string divider) {
17 integer index = llSubStringIndex( src, divider );
18 if(~index)
19 return llDeleteSubString( src, index , -1);
20 return src;
21 }
22
23 string right(string src, string divider) {
24 integer index = llSubStringIndex( src, divider );
25 if(~index)
26 return llDeleteSubString( src, 0, index + llStringLength(divider) - 1);
27 return src;
28 }
29
30
31
32 default
33 {
35 {
36 llSetText("Click after setting up all tour prims.", <1.0, 1.0, 1.0>, 2.0);
37 llListen(300,"","","");
38 }
39
41 {
42 llOwnerSay("Please wait");
43 prims = [];
44 wanted ++;
45 llRegionSay(300,"where");
46 }
47
48 listen(integer channel,string name, key id, string message)
49 {
50 debug(llGetObjectName() + " heard " + message);
51 if(wanted)
52 {
53 list msg = llParseString2List(message,["|"],[""]);
54 integer aname = llList2Integer(msg,0);
55 vector dest = llList2Vector(msg,1);
56 rotation arot = llList2String(msg,2);
57 integer isthere = llListFindList(prims,[aname]);
58
59
60 if(isthere > -1)
61 {
62 llOwnerSay("Error, there are two prims named " + aname + ". Please make sure each prim is uniquely numbered from - to N in sequence from the start prim to the finish prim. Gaps in the sequence are allowed.");
63 }
64
65 if(wanted)
66 {
67 prims += (integer) aname;
68 prims += (vector) dest;
69 prims += (rotation) arot;
70
71 }
72 llSetTimerEvent(10.0);
73 }
74 }
75
76 timer()
77 {
78 wanted = 0;
80 integer i = 0;
81
82 prims = llListSort(prims,3,1);
83
84
85 for (i = 0; i < llGetListLength(prims); i+=3)
86 {
87 integer primnum = llList2Integer(prims,i);
88 vector loc = llList2Vector(prims,i+1);
89 rotation arot = llList2Rot(prims,i+2);
90 llOwnerSay((string) primnum + "|" + (string) loc + "|" + (string) arot );
91
92 }
93 llOwnerSay("Copy the above lines to the notecard in the tour guide and reset it");
94
95
96 }
97
99 {
101 }
102 }

OpenSim Tour Car

Opensim Tour Boat

Category: Tour
By : Ferd Frederix
Created: 2014-09-07 Edited: 2015-05-29
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1 // Tour car prim for Opensim - can switch the vehicle while riding
2 // Put a unique name in the cars prims for each type.
3
4
5
6 integer _debug = 0;
7
8 integer REZ = 3454; // shouts Rex on this channel so a rezzer can produce another car, as this one will die
9 float INTERVAL = 0.5; // How often to check for progress
10 float TOLERANCE = 2; // how close to the destination we have to get
11 float SPEED = 8.0; // speed of vehicle
12
13 vector TARGET = <0,0,0>; // sit position on the root prim. Ste this to <0,0,0> if you want to not to be able to sit on the base
14 vector ROT = <0,0,0>; // and the rotation, if they sit
15
16 list lCoordinate;
17 list lRotation ;
18 list lText;
19 list lPrim;
20
21 // notecard reading
22 integer iIndexLines;
23 integer i;
24 string NOTECARD = "Route"; // the notecard for configuring
25
26 key kNoteCardLines; // the key of the notecard
27 key kGetIndexLines; // the key of the current line
28
29 integer count = 0;
30
31 vector TargetLocation;
32 rotation TargetRotation;
33
34 Switch(string whichPrim)
35 {
37 integer i;
38 for ( i = 1; i < n; i++) {
39
40 if(llGetLinkName(i) == whichPrim) {
42 } else {
43 llSetLinkAlpha(i,0,ALL_SIDES); // 0 = transparent
44 }
45 }
46 }
47
48
49 Goto()
50 {
51 if(_debug)
52 llOwnerSay("Looking at Target Location = " + (string) TargetLocation);
53
54 vector ownPosition = llGetPos();
55 float dist = llVecDist(ownPosition, TargetLocation);
56
57 float rate = dist / SPEED;
58
59 rotation ownRotation = llGetRot();
60
61 llSetKeyframedMotion(
62 [(TargetLocation - ownPosition) + <0.0, 0.0, -.5> * TargetRotation,
63 NormRot(TargetRotation/ownRotation), rate],
64 []);
65
66
67 }
68
69 rotation NormRot(rotation Q)
70 {
71 float MagQ = llSqrt(Q.x*Q.x + Q.y*Q.y +Q.z*Q.z + Q.s*Q.s);
72
73 return
74 <Q.x/MagQ, Q.y/MagQ, Q.z/MagQ, Q.s/MagQ>;
75 }
76
77 integer locationLength;
78
79
80 string strip( string str)
81 {
82 string out;
83 integer i;
84
85 //llOwnerSay("str = " + str);
86
87 for ( ; i < llStringLength(str); i++)
88 {
89 out += llGetSubString(str,i,i);
90
91 out = llStringTrim(out, STRING_TRIM);
92 //llOwnerSay("out = " + out + " at " + (string) i);
93 }
94 return out;
95
96 }
97
98 string Getline(list Input, integer line)
99 {
100 return strip(llList2String(Input, line));
101 }
102
103
104 default
105 {
106 on_rez(integer param)
107 {
109 }
110
111 changed( integer change )
112 {
113 if(change & CHANGED_INVENTORY)
114 {
116 }
117 }
118
120 {
121
122 llSetLinkPrimitiveParamsFast(LINK_ROOT,
123 [PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_CONVEX,
124 PRIM_LINK_TARGET, LINK_ALL_CHILDREN,
125 PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_NONE]);
126
127 llSetCameraEyeOffset(<0, 5, 0> );
128 llSetCameraAtOffset(<0, 0, 1>);
129
130
131 rotation rot = llEuler2Rot(ROT * DEG_TO_RAD); // convert the degrees to radians, then convert that vector into a rotation, rot30x
132 llSitTarget(TARGET, rot); // where they sit
133
134
135 kNoteCardLines = llGetNumberOfNotecardLines(NOTECARD);
136 kGetIndexLines = llGetNotecardLine(NOTECARD,0);
137
138 llSay(0, "Tour guide initialising. Please wait.");
139 }
140
141 // read notecard on bootup
142 dataserver(key queryid, string data)
143 {
144
145 vector TempLocation;
146 if(queryid == kNoteCardLines)
147 {
148 iIndexLines = (integer) data;
149 }
150
151 if(queryid == kGetIndexLines)
152 {
153 if(data != EOF)
154 {
155 queryid = llGetNotecardLine(NOTECARD, i);
156 list lLine = (llParseString2List(data, ["|"], []));
157 if(_debug ) llOwnerSay("Line = " + llDumpList2String(lLine,":"));
158
159 TempLocation = (vector) Getline(lLine,1);
160 if(TempLocation != ZERO_VECTOR)
161 {
162 rotation Rot = (rotation) llList2String(lLine,2);
163 string text = llList2String(lLine,3);
164 string primName = llList2String(lLine,4);
165
166 if(_debug) llOwnerSay((string)TempLocation);
167
168 lCoordinate += [TempLocation];
169 lRotation += [Rot];
170 lText += [text];
171 lPrim += [primName];
172
173 locationLength = (llGetListLength(lCoordinate));
174 integer InitPerCent = (integer) llRound(((float) locationLength / (float) iIndexLines) * 100);
175 llSetText("Initialising... \n" + (string) InitPerCent + "%" , <1,1,1>, 1.0);
176 if(InitPerCent == 100)
177 {
178 state Paused;
179 }
180
181 }
182 else
183 {
184 state Paused;
185 }
186 i++;
187 }
188 kGetIndexLines = llGetNotecardLine(NOTECARD,i);
189 // (_debug ) llOwnerSay("Got " + (string) i);
190 }
191 }
192
193
195 {
196 llSetText("", <1,1,1>, 1.0);
197 TargetLocation = llList2Vector(lCoordinate, 0); // Look at 0th
198 TargetRotation = llList2Rot(lRotation, 0); // Look at 0th
199 Goto();
200 }
201 }
202
203
204 state Paused
205 {
207 {
208 llSay(0,"Ready");
209 }
210
211 link_message(integer sender,integer num,string msg, key id)
212 {
213 if(msg =="sit")
214 {
215 llWhisper(0,"Please stay seated. Waiting 10 seconds for a passenger");
216
217 llSleep(10.0);
218
219 llShout(REZ,"rez");
220 state moving;
221 }
222 }
223
224 on_rez(integer param)
225 {
227 }
228
229 changed( integer change )
230 {
231 if(change & CHANGED_INVENTORY)
232 {
234 }
235 }
236 }
237
238 state moving
239 {
240
242 {
243
244 if(_debug) llOwnerSay("State Moving entered, is pointing to target " + (string) TargetLocation );
245
246 string SpeakThis = llList2String(lText, count);
247
248 if(llStringLength(SpeakThis))
249 llSay(0,SpeakThis);
250
251 llSetTimerEvent(INTERVAL);
252 }
253
254 changed(integer change)
255 {
256 if(change & CHANGED_LINK)
257 {
259 //llWhisper(0,"Sit by " + (string) av);
260 if(av == NULL_KEY) {
261 state end;
262 }
263 }
264 if(change & CHANGED_INVENTORY)
265 {
267 }
268 }
269
270
271 on_rez(integer param)
272 {
274 }
275
276 timer()
277 {
278
279 if(llVecMag(llGetPos() - TargetLocation) <= TOLERANCE) {
280
281 if(_debug) llOwnerSay("At location: " + (string) llGetPos());
282 count ++;
283
284 if(count >= locationLength) {
285
286 state end;
287
288 if(_debug) llOwnerSay("Restart: " + (string) TargetLocation);
289 TargetLocation = llList2Vector(lCoordinate, 0); // Look at 0th
290 TargetRotation = llList2Rot(lRotation, 0); // Look at 0th
291 Goto();
292 count = 0;
293
294 } else {
295 TargetLocation = llList2Vector(lCoordinate, count); // Look at nth
296 TargetRotation = llList2Rot(lRotation, count); // Look at nth
297 string SpeakThis = llList2String(lText, count);
298
299 if(llStringLength(SpeakThis))
300 llSay(0,SpeakThis);
301
302 // if the last param is a name, change any prim by that name to be visible, and any others to be invidible.
303 string whichPrim = llList2String(lPrim, count);
304 if(whichPrim)
305 Switch(whichPrim);
306
307 Goto();
308 if(_debug) llOwnerSay("New Target: " + (string) TargetLocation);
309 }
310 }
311
312 }
313
315 {
317 }
318 }
319
320
321 state end
322 {
324 {
325 llMessageLinked(LINK_SET,0,"DOOR OPEN","");
326
328
330 if(av != NULL_KEY) {
331 //llWhisper(0, llKey2Name(av) +", please go into the hotel and check in.");
332 llUnSit(av);
333 }
335 }
336 on_rez(integer param)
337 {
339 }
340 timer()
341 {
342 llDie();
343 }
344
345 }

OpenSim Tour Car

Tour car seat for Multi-vehicle script - place this in any seat and adjust the TARGET and ROT as necessary

Category: Tour
By : Ferd Frederix
Created: 2014-09-07 Edited: 2015-05-29
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2
3 vector TARGET = <0,0,0.1>; // sit position on the root prim. Ste this to <0,0,0> if you want to not to be able to sit on the base
4 vector ROT = <0,0,0>; // and the rotation, if they sit
5
6
7 default
8 {
10 {
11 llSetCameraEyeOffset(<5, 0, 0> );
12 llSetCameraAtOffset(<0, 0, 1>);
13
14 rotation rot = llEuler2Rot(ROT * DEG_TO_RAD); // convert the degrees to radians,
15 // then convert that vector into a rotation
16 llSitTarget(TARGET, rot); // where they sit
17
18 }
19
20 changed( integer what )
21 {
22 if(what & CHANGED_LINK)
23 {
25 if(av != NULL_KEY) {
26 llMessageLinked(LINK_SET,0, "Sit","");
27 }
28 }
29 }
30
31
32
33
34 }

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