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 Paramour Builders Buddy  

Paramour Builders Buddy

Paramour Builder's Buddy v1.0

Category: Building
By : Aine Caoimhe
Created: 2015-11-24 Edited: 2016-05-03
Worlds: OpenSim

the Zip file

Download all files for Paramour Builders Buddy
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. [43170 bytes] buddy.png
Get file # 2. [173475 bytes] buddy_no_tex.png
Get file # 3. Paramour Builders Buddy Instructions.txt
Get file # 4. Paramour Builders Buddy.lsl
Get file # 5. [63845 bytes] Two prim HUD.jpg
1
2 PARAMOUR BUILDER'S BUDDY v1.0
3
4 The Paramour Builder's Buddy is provided under Creative Commons Attribution-Non-Commercial-ShareAlike 4.0 International license. (https://creativecommons.org/licenses/by-nc-sa/4.0/)
5
6 INSTRUCTIONS
7
8
9 This is a simple HUD tool that I find handy for working with prims where it's difficult to select their individual faces, although there are other possible applications for it. It isn't fancy but it's useful at times.
10
11 REQUIRES OSSL
12 This tool requires access to the following OSSL functions:
13 - osIsUUID() used to confirm that a supplied UUID for a target is valid
14 - osGetPrimitiveParams() used to retrieve current texture data
15 - osSetPrimitiveParams() used to set new texture data
16
17 How to use it:
18
19 1. Wear the HUD
20 2. In edit more in your viewer, select the in-world object (your "target") that you want to texture and copy its UUID (copy keys button)
21 3. Touch the HUD's "Set Target" button...a text box dialog will pop up
22 4. Paste the key into the text box...you can only supply 1 key at a time
23 5. (Optional) If you want to retrieve the current texture data from that object, click the "Get Textures" button on the HUD
24 6. At the bottom of the HUD are 8 boxes, one for each possible face of the target (face 0,1,2,3 on the upper row, and 4,5,6,7 on the lower). A red X indicates the target doesn't have this face due to its shape
25 7. In edit mode on your viewer, switch into "select face" mode (the exact name of this varies depending on which viewer you use)
26 8. Change the texture on the corresponding face of the 8 HUD boxes. The settings it can transfer are:
27 - Texture
28 - Texture tiling
29 - Texture offset
30 - Texture rotation
31 - Colour
32 - Alpha
33 - Shiny setting (only "high", "medium", "low" or "none"...Opensim doesn't support setting advanced materials via script)
34 - Bump setting (again, only the old SL ones...Opensim doesn't support setting advanced materials via script)
35 - fullbright (unfortunately HUDs always display as fullbright but you can change the setting here and it will transfer it)
36 - glow (HUDs cannot display glow but it will transfer any value you set)
37 9. Click the "Set Textures" button to have them applied to your target
38
39 At any time you can "Get Textures" again or set a new target
40 The "Reset" button clears the current target from memory and resets the HUD's textures just in case you have an accident and forget to switch to face select mode before doing texturing.
41 There are two textures in the HUD's inventory that are used for its display. Don't delete them :)

Paramour Builders Buddy

Paramour Builder's Buddy v1.0

Category: Building
By : Aine Caoimhe
Created: 2015-11-24 Edited: 2016-05-03
Worlds: OpenSim

1 //
2 // by Aine Caoimhe (LACM) Nov. 2015
3 // Provided under Creative Commons Attribution-Non-Commercial-ShareAlike 4.0 International license.
4 // Please be sure you read and adhere to the terms of this license: https://creativecommons.org/licenses/by-nc-sa/4.0/
5 //
6 // USER SETTINGS
7 // normally you shouldn't need to change these
8 key blankTexture="buddy_no_tex"; // builder's buddy face texture for no face...should be in the prim's inventory
9 string builderTexture="buddy"; // builder's buddy buttons texture name...should be in the prim's inventory
10 float timeOut=60.0; // how many seconds to wait for a target key to be supplied before closing the listener
11 //
12 // DON'T CHANGE ANYTHING BELOW HERE UNLESS YOU KNOW WHAT YOU'RE DOING!
13 integer tPrim=1;
14 integer bPrim=2;
15 key target;
16 list faces;
17 integer FACE_SET_TARGET=0;
18 integer FACE_RESET_FACES=1;
19 integer FACE_GET_TEXTURES=2;
20 integer FACE_SET_TEXTURES=3;
21 integer FACE_NONE=5;
22 integer myChannel;
23 integer handle;
24
25 getTextures()
26 {
27 if(!confirmTarget()) return;
28 integer f;
29 while(f<8)
30 {
31 if(llListFindList(faces,[f])>-1)
32 {
33 list data=osGetPrimitiveParams(target,[
35 PRIM_COLOR,f,
38 PRIM_GLOW,f
39 ]);
40 data=[]+[PRIM_TEXTURE,f]+llList2List(data,0,3)+[PRIM_COLOR,f]+llList2List(data,4,5)+[PRIM_BUMP_SHINY,f]+llList2List(data,6,7)+[PRIM_FULLBRIGHT,f,llList2Integer(data,8),PRIM_GLOW,f,llList2Float(data,9)];
41 llSetLinkPrimitiveParamsFast(tPrim,data);
42 }
43 f++;
44 }
45 llOwnerSay("Textures retrieved");
46 }
47 setTextures()
48 {
49 if(!confirmTarget()) return;
50 integer l=llGetListLength(faces);
51 while(--l>-1)
52 {
53 integer f=llList2Integer(faces,l);
54 list data=llGetLinkPrimitiveParams(tPrim,[
56 PRIM_COLOR,f,
59 PRIM_GLOW,f
60 ]);
61 data=[]+[PRIM_TEXTURE,f]+llList2List(data,0,3)+[PRIM_COLOR,f]+llList2List(data,4,5)+[PRIM_BUMP_SHINY,f]+llList2List(data,6,7)+[PRIM_FULLBRIGHT,f,llList2Integer(data,8),PRIM_GLOW,f,llList2Float(data,9)];
62 osSetPrimitiveParams(target,data);
63 }
64 llOwnerSay("Textures set");
65 }
66 integer confirmTarget()
67 {
68 if(llKey2Name(target)=="")
69 {
70 llOwnerSay("Cannot locate the target object with key "+(string)target+" in this region. Please set a new target");
71 target=NULL_KEY;
72 return FALSE;
73 }
74 else return TRUE;
75 }
76 countFaces()
77 {
78 faces=[];
79 integer f;
80 while(f<8)
81 {
83 if(tex!="") faces=[]+faces+[f];
84 else llSetLinkPrimitiveParamsFast(tPrim,[
85 PRIM_TEXTURE,f,blankTexture,<1,1,0>,ZERO_VECTOR,0.0,
86 PRIM_COLOR,ALL_SIDES,<1,1,1>,1,
90 ]);
91 f++;
92 }
93 string targetName=llList2String(llGetObjectDetails(target,[OBJECT_NAME]),0);
94 llOwnerSay("Set target to the prim \""+targetName+"\" which has "+(string)llGetListLength(faces)+" faces");
95 }
96 resetFaces()
97 {
98 llSetLinkPrimitiveParamsFast(tPrim,[
99 PRIM_TEXTURE,ALL_SIDES,blankTexture,<1,1,0>,ZERO_VECTOR,0.0,
100 PRIM_COLOR,ALL_SIDES,<1,1,1>,1,
104 ]);
105 llSetLinkPrimitiveParamsFast(bPrim,[PRIM_TEXTURE,ALL_SIDES,builderTexture,<1,1,0>,<0,0,0>,0]);
106 target=NULL_KEY;
107 }
108 getTarget()
109 {
110 myChannel=0x80000000 | (integer)("0x"+(string)llGetKey());
111 handle=llListen(myChannel,"",llGetOwner(),"");
112 llTextBox(llGetOwner(),"Paste the key of your desired target object into this text box",myChannel);
113 llSetTimerEvent(timeOut);
114 }
115 default
116 {
118 {
119 target=NULL_KEY;
120 }
121 timer()
122 {
123 llOwnerSay("I did not hear a response yet. Closing the listener");
124 llListenRemove(handle);
125 llSetTimerEvent(0.0);
126 }
128 {
129 key toucher=llDetectedKey(0);
130 if(toucher!=llGetOwner()) return;
133 if(prim==tPrim) return;
134 else if(face==FACE_NONE) return;
135 else if(face==FACE_RESET_FACES) resetFaces();
136 else if(target==NULL_KEY)
137 {
138 if((prim==bPrim)&&(face==FACE_SET_TARGET)) getTarget();
139 else llRegionSayTo(toucher,0,"No target set");
140 return;
141 }
142 else if(face==FACE_GET_TEXTURES) getTextures();
143 else if(face==FACE_SET_TEXTURES) setTextures();
144 }
145 changed(integer change)
146 {
147 if(change & CHANGED_OWNER) llResetScript();
148 else if(change & CHANGED_REGION_START) llResetScript();
149 }
150 on_rez(integer foo)
151 {
153 }
154 listen(integer channel, string name, key who, string message)
155 {
156 llListenRemove(handle);
157 llSetTimerEvent(0.0);
158 message=""+llStringTrim(message,STRING_TRIM);
159 if(message!="")
160 {
161 if(osIsUUID(message))
162 {
164 {
165 target=(key)message;
166 if(confirmTarget()) countFaces();
167 }
168 else llOwnerSay("You can't use this on an avatar");
169 }
170 else llOwnerSay("The key \""+message+"\" is not a valid UUID");
171 }
172 else llOwnerSay("Can't set an empty string as the target");
173 }
174 }

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