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
Building Big_Build_Mover_scripts  

Big_Build_Mover_scripts

INSTRUCTIONS

If you have a comple...

Category: Building
By : Poppet McGimsie
Created: 2010-11-18 Edited: 2010-11-18
Worlds: Second Life

the Zip file

Download all files for Big_Build_Mover_scripts
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Big_Build_Mover_scripts_1.lsl
Get file # 2. Big_Build_Mover_scripts_2.lsl
Get file # 3. Big_Build_Mover_scripts_3.lsl
Get file # 4. Big_Build_Mover_scripts_4.lsl
1 // SL side exporter script
2
3 //BIG BUILD EXPORTER BASE SCRIPT
4
5 //This script is made available for free use, and it must remain that way. Poppet McGimsie, November 2008.
6
7 //for SL side: Place this script in the rez box of the build to be exported from SL (clear out any scripts in the rez box first to avoid interference).
8
9 integer PRIMCHAN = 111;
10
11
12 default {
13
14
15
16 touch_start (integer total_number)
17 {
18
19
20
21 llShout(PRIMCHAN, llDumpList2String([ llGetPos(), llGetRot() ], "|"));
22
23 }
24 }

Big_Build_Mover_scripts

Second script:

Category: Building
By : Poppet McGimsie
Created: 2010-11-18 Edited: 2010-11-18
Worlds: Second Life

1 //BIG BUILD EXPORTER COMPONENT script
2 //This script is made available for free use, and it must remain that way. Poppet McGimsie, November 2008.
3
4 //for SL side: Place this script in the root prim of each component of a build, to ready it for export from SL using a utility like Second Inventory.
5
6 integer PRIMCHAN = 111;
7
8
9 default
10 {
11
13 {
14
15
16 llListen(PRIMCHAN, "", NULL_KEY, "");
17 }
18
19
20
21 listen(integer iChan, string sName, key kID, string sText)
22 {
23
24 list lParams = llParseString2List(sText, [ "|" ], []);
25 vector vBase = (vector)llList2String(lParams, 0);
26 rotation rBase = (rotation)llList2String(lParams, 1);
27
28 vector vOffset = (llGetPos() - vBase) / rBase;
29 llSay(0,(string)vOffset);
30 rotation rRotation = llGetRot() / rBase;
31 llSay(0,(string)rRotation);
32
33
34 llSetObjectName( (string) vOffset);
35 llSetObjectDesc( (string) rRotation);
36
37
38 }
39
40
41 }

Big_Build_Mover_scripts

OSgrid side importer scripts (two scripts)

Script 1:

Category: Building
By : Poppet McGimsie
Created: 2010-11-18 Edited: 2010-11-18
Worlds: Second Life

1
2 //BIG BUILD IMPORTER BASE script
3
4 //based on Builder's Buddy from http://www.lslwiki.com/lslwiki/wakka.ph ... ldersBuddy
5
6 //Free to use and must remain so.
7
8 //Place this script in the rez box with the components (after adding component script to them) to assemble the imported build.
9 //leftclick rez box and select BUILD to assemble the components
10 //to move the build, leftclick rez box and select CLEAN then move the rez box and re-rezz the build.
11 //when you are done, leftclick rez box and pick DONE to remove the compoenent scripts from the components.
12
13
14 integer PRIMCHAN = 111;
15
16 string optBuild = "Build";
17 string optClean = "Clean";
18 string optDone = "Done";
19 string descBuild = " : Spawn inv. items and position them\n";
20 string descClean = " : De-Rez all pieces\n";
21 string descDone = " : Remove all BB scripts and make the parts permanent.\n";
22 string title = "";
23
24 list optionlist;
25
26
27 default {
28
30 {
31 llListen(112,"","","");
32 optionlist = [optBuild, optClean, optDone];
33
34 title += optBuild + descBuild;
35
36 title += optClean + descClean;
37 title += optDone + descDone;
38 }
39
40 touch_start (integer total_number) {
41
42
43
44
45
46
47
48 llDialog(llDetectedKey(0), title, optionlist, 112);
49
50
51
52 }
53
54
55 listen(integer channel, string name, key id, string message) {
56
57
58 if( message == optBuild ) {
59 vector vThisPos = llGetPos();
60 rotation rThisRot = llGetRot();
61 integer i;
63
64 //Loop through backwards (safety precaution in case of inventory change)
65 llOwnerSay("Rezzing build pieces...");
66 for( i = iCount - 1; i >= 0; i-- )
67 {
68 llRezObject(llGetInventoryName(INVENTORY_OBJECT, i), vThisPos, ZERO_VECTOR, rThisRot, PRIMCHAN);
69
70 }
71
72 llSay(0,"Still building -- please wait 20 sec until I say I'm done....");
73 llSleep(20);
74 llSay(0,"Positioning");
75 llShout(PRIMCHAN, "MOVE");
76 llSay(0,"Done!");
77
78 }
79
80
81 if( message == optClean ) {
82 llShout(PRIMCHAN, "CLEAN");
83 return;
84 }
85 if( message == optDone ) {
86 llShout(PRIMCHAN, "DONE");
87 //llDie();
88 llOwnerSay("Removing mover scripts.");
89 return;
90 }
91 }
92
93
94
95 on_rez(integer iStart)
96 {
97 PRIMCHAN = iStart;
98 llShout(PRIMCHAN, "CLEAN");
99 //Reset ourselves
100 //llResetScript();
101 }
102 }

Big_Build_Mover_scripts

Script 2:

Category: Building
By : Poppet McGimsie
Created: 2010-11-18 Edited: 2010-11-18
Worlds: Second Life

1
2 //BIG BUILD IMPORTER COMPONENT script
3 //based on Builders' Buddy from http://www.lslwiki.com/lslwiki/wakka.ph ... ldersBuddy
4 //very very stripped down from the original
5
6 //this script is free to use and must remain so
7
8
9 integer PRIMCHAN = 111;
10
11
12
13 vector vOffset;
14 rotation rRotation;
15
16 key owner;
17 key controller;
18
19 vector vBase;
20 rotation rBase;
21
22
23
24
25 default
26 {
27 //////////////////////////////////////////////////////////////////////////////////////////
29 {
30
31
32 llListen(PRIMCHAN, "", NULL_KEY, "");
33 }
34
35 //////////////////////////////////////////////////////////////////////////////////////////
36 on_rez(integer iStart)
37 {
38
39
40
41 vBase = llGetPos();
42 rBase = llGetRot();
43
44
45
46 }
47
48 //////////////////////////////////////////////////////////////////////////////////////////
49 listen(integer iChan, string sName, key kID, string sCmd)
50 {
51
52
53
54
55 //////////////////////////////////////////////////////////////////////////////////////////
56 if( sCmd == "MOVE" )
57 {
58
59
60
61 list posl = llParseString2List(llGetObjectName(), [], []);
62 list rotl = llParseString2List(llGetObjectDesc(), [], []);
63 llSay(0,(string)posl);
64 llSay(0,(string)rotl);
65 vOffset = (vector)llList2String(posl, 0);
66 rRotation = (rotation)llList2String(rotl, 0);
67
68
69
70 vector vDestPos = (vOffset * rBase) + vBase;
71 rotation rDestRot = rRotation * rBase;
72
73
74 integer i = 0;
75 vector vLastPos = ZERO_VECTOR;
76 while( (i < 5) && (llGetPos() != vDestPos) )
77 {
78 list lParams = [];
79
80 //If we're not there....
81 if( llGetPos() != vDestPos )
82 {
83 //We may be stuck on the ground...
84 //Did we move at all compared to last loop?
85 if( llGetPos() == vLastPos )
86 {
87 //Yep, stuck...move straight up 10m (attempt to dislodge)
88 lParams = [ PRIM_POSITION, llGetPos() + <0, 0, 10.0> ];
89 //llSetPos(llGetPos() + <0, 0, 10.0>);
90 } else {
91 //Record our spot for 'stuck' detection
92 vLastPos = llGetPos();
93 }
94 }
95
96
97 integer iHops = llAbs(llCeil(llVecDist(llGetPos(), vDestPos) / 10.0));
98 integer x;
99 for( x = 0; x < iHops; x++ ) {
100 lParams += [ PRIM_POSITION, vDestPos ];
101 }
102 llSetPrimitiveParams(lParams);
103
104 i++;
105 }
106
107
108 llSetRot(rDestRot);
109 return;
110 }
111
112
113 if( sCmd == "DONE" )
114 {
115 //We are done, remove script
116
118 return;
119 }
120
121
122 if( sCmd == "CLEAN" )
123 {
124
125
126 //Clean up
127 llDie();
128 return;
129 }
130
131
132
133 }
134
135
136
137 }

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