Jump to content

Rufus Darkfold

Resident
  • Posts

    300
  • Joined

  • Last visited

Everything posted by Rufus Darkfold

  1. I haven't tried this myself, but it should work, I think. Go in high enough to be above the banlines and cam in. If you get to where you can see your items, you should be able to take them. There is a new feature that would prevent you from seeing in, if he set it, but as it is a very new feature, he may not have done so.
  2. This thread tells how to get the current local position: http://community.secondlife.com/t5/LSL-Scripting/Moving-a-child-prim-with-llSetLinkPrimitiveParams/td-p/1011663
  3. PRIMPOS2 needs to be local to the root prim for Set. Note that the corresponding Get functions return REGION coordinates, not local coordinates. If you pass a region coordinate to PRIM_POSITION for a child prim, it would usually result in a move of more than 65 meters, which causes it not to move at all.
  4. And if you already have such an object and can't get in to edit the script, rez it in a no-script area.
  5. You can also do it by loading the primset script into the prim, touching it, then chatting: /884 7,<64,64,64> You can resize it as often as you like with the script (or make any other changes you want, it just passes the list to llSetLinkPrimitiveParams). You should also be able to resize megas built with the scripts in the OP.
  6. You can even go underground. I'm building a subway under my property in Sentry and Comet.
  7. I have determined experiimentally that the link distance limitations do NOT apply when the object being moved is a seated avatar.
  8. Do disabled scripts consume fewer resources? How expensive is enabling or disabling them? Disabling does reduce the number of scripts that are listening for events, which should reduce lag, as well as avoiding bugs from handlers firing when the functionality with which they are associated is not in use. This is for stuff that is called relatively infrequently, in particular when someone clicks a button associated with that script. The fact of being activated is all the information the script being activated needs in this case, so a link message is avoided. I understand that disabled scripts can lose state on sim crossings or restarts. (That does not matter for these scripts because they reset after they are re-activated anyway).
  9. Void Singer wrote: :: reads the fix list in horror :: "Fix to prevent LSL scripts from using non-finite numbers in physical functions. " please oh please tell me that doesn't mean what I think that means.... if they just broke posJump all those previous goodies are going to be drowned in howls of anger, and chants of lamentation posJump uses non-physical functions. Hopefully they'll leave it alone. I can see where infinity might be problematical for physics. I think we might be experiencing the negative effects thereof during some failed sim crossings.
  10. You would need to execute llGetParcelInfo 4096 times to get all the parcel names and rough boundaries for a single sim. Getting the owner name is a dataserver request unless it is in the sim's cache. Instead, my navigator HUD scans ahead in the direction I am looking (how far ahead depends on how fast I am moving), and it will also check anywhere in the same sim that I click. It displays parcel name, prim count/max, banlines, rez zones, damage enabled, nofly, and the owner name if the sim has it in cache or if it is "Governor Linden". Clicks also generate slurls in chat history which can be clicked for more information or to teleport. It can also check in other sims if those sims have a navigator beacon. Dots appear on the map in either case, green for OK, red for banlined or full parcel, yellow for no information. Contact me in-world if you would like one. It is free, full-perm, and open-source.
  11. I don't think you'd even need a script. Just turn on "flexible" in the "features" tab and turn up "wind" a little.
  12. It is an integer, not a string, unfortunately.
  13. Does RLV allow my objects to teleport me? If so, can I use RLV without getting caught up in any S&M games by not enabling any relays?
  14. http://community.secondlife.com/t5/LSL-Scripting/dialogger-an-alternative-to-llDialog/m-p/981569/highlight/true#M3894
  15. If by "object" you mean an object in the HUD's inventory, the answer is no. If you mean a child prim of the HUD, yes, though increasingly it is becoming unnecessary due to new APIs that allow manipulating more properties of child prims directly.
  16. Jacking up the "Tension" setting (with drag set very low) will generate more motion. This is nice for the sim because it's all client-side, unlike any kind of scripted motion.
  17. Continued from preceding message: default { state_entry() { integer i; // assume we can use all child prims until told otherwise for (i=2; i<=llGetNumberOfPrims(); i++) { settingchild += i; llClearLinkMedia(i, 0); } newshape(); initpage(); //llSetText("", ZERO_VECTOR, 0.0); if (llGetAttached()) { //llSetRot(llEuler2Rot(<0, PI*1.5, PI*1.5>)); permissionsdesired = PERMISSION_TRACK_CAMERA|PERMISSION_TAKE_CONTROLS|PERMISSION_ATTACH; } hlisten = llListen(mychannel, "", "", ""); llRequestPermissions(llGetOwner(), permissionsdesired); } attach(key id) { debugout("attached to "+(string)llGetAttached()); if (id != NULL_KEY) { permissionsdesired = permissionsdesired & ~ PERMISSION_CHANGE_LINKS; //llSetRot(llEuler2Rot(<0, PI*1.5, PI*1.5>)); //positionmarker(2, ZERO_VECTOR, ZERO_ROTATION, ZERO_ROTATION, ""); if ((llGetPermissions() & permissionsdesired) == permissionsdesired) { llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_LEFT | CONTROL_RIGHT | CONTROL_ROT_LEFT | CONTROL_ROT_RIGHT | CONTROL_UP | CONTROL_DOWN, TRUE, TRUE); } else { llRequestPermissions(llGetOwner(), permissionsdesired); } } } run_time_permissions(integer perm) { if (perm & PERMISSION_TAKE_CONTROLS) { debugout("Taking Controls"); llTakeControls(controlbits, TRUE, TRUE); } } changed(integer what) { //llOwnerSay("changed " +(string)what); if (what & CHANGED_SHAPE) { list newshape = llGetPrimitiveParams([PRIM_TYPE]); taper = llList2Vector(newshape, 5); shear = llList2Vector(newshape, 6); } if (what & CHANGED_SCALE) { vector s=llGetScale(); if (s.z > .02) // don't display if folded up positionmarkers(); } if (what & CHANGED_TEXTURE) { integer i; for (i=0; i<llGetListLength(settingminmax);i++) { rotation px = llList2Rot(settingminmax,i); if ((px.x == 1.0) && (px.y == 1.0) && (px.z == 0.0)) { llSleep(1.0); // Let them see it updatemarker(i, ZERO_VECTOR, (integer)px.s); } } } } control(key id, integer level, integer edge) { if (havecontrols){ integer side = 0; //debugout("level=" +hex(level) + " edge=" +hex(edge)); if (!~lastindex) return; //rotation cbox = llList2Rot(settingbox,lastindex); if (level & (CONTROL_LEFT+CONTROL_ROT_LEFT)) { newst.x += controlspeed; side = 4; } if (level & (CONTROL_RIGHT+CONTROL_ROT_RIGHT)) { newst.x -= controlspeed; side = 4; } if (level & CONTROL_FWD) newst.y += controlspeed; if (level & CONTROL_BACK) newst.y -= controlspeed; if (level & CONTROL_UP) { newst.z -= controlspeed; side = 2; } if (level & CONTROL_DOWN) { newst.z += controlspeed; side = 2; } if (newst.x < 0) newst.x = 0; if (newst.x > 1) newst.x = 1; if (newst.y < 0) newst.y = 0; if (newst.y > 1) newst.y = 1; updatemarker(lastindex,newst, side); llSleep(0); } } touch_start(integer num) { if (havecontrols) { llTakeControls(controlbits, TRUE, TRUE); havecontrols = 0; llOwnerSay("Controls released"); llSetLinkPrimitiveParamsFast(llList2Integer(settingchild, lastindex), [PRIM_COLOR, ALL_SIDES, <1,1,1>, 1.0-transparency]); } if (!dialogactive) return; integer t; for (t=0; t<num; t++) { integer child = llDetectedLinkNumber(t); touchedside = llDetectedTouchFace(t); touched = llDetectedTouchST(t); llResetTime(); integer i = llListFindList(settingchild, [child]); if (~i) { rotation r = llList2Rot(settingminmax, i); if (r.x > r.z) { // some kind of button updatemarker(i, touched, touchedside); } } else { debugout("Touched side " + (string)touchedside); return; } } } touch(integer num) { if (!dialogactive) return; integer t; for (t=0; t<num; t++) { integer child = llDetectedLinkNumber(t); vector scale = llGetScale(); vector pos = llGetLocalPos(); vector newtouched = llDetectedTouchST(t); vector prevtouched = lasttouched; integer newtouchedside = llDetectedTouchFace(t); if (~newtouchedside) { lasttouched = newtouched; lasttouchedside = newtouchedside; } else { if (lasttouched.x < .05) lasttouched.x = 0.0; if (lasttouched.x > .95) lasttouched.x = 1.0; if (lasttouched.y < .05) lasttouched.y = 0.0; if (lasttouched.y > .95) lasttouched.y = 1.0; } integer i; debugout("child: "+(string)child + " touch: " +(string)lasttouched+ " side " + (string)touchedside +"/" +(string)lasttouchedside); i = llListFindList(settingchild, [child]); if (~i) { rotation r = llList2Rot(settingminmax, i); if ((r.x < 3) && (r.x > r.z)) // some kind of button return; if (lasttouched != prevtouched) updatemarker(i, lasttouched, lasttouchedside); lastindex = i; if ((llGetTime() > 5.0) && (lasttouched == touched)) { llTakeControls(controlbits, TRUE, FALSE); havecontrols = child; llOwnerSay("Keyboard/Joystick now controls " + llList2String(settingname, i) +"\nClick again to release controls"); llSetLinkPrimitiveParams(child, [PRIM_COLOR, ALL_SIDES, <1,.7,0>, 1.0-transparency]); } llSleep(touchrate); } } } listen(integer chan, string name, key id, string msg) { if (llGetOwner() != id) { if (llList2Key(llGetObjectDetails(id, [OBJECT_OWNER]),0) != llGetOwner()) return; } if (chan == mychannel) { chatsender = id; process_msg(msg, TRUE); } } link_message(integer sender, integer num, string msg, key id) { debugout("Linked Msg(" + (string)num + "):" + msg + " {" + (string)id + "}"); if (num == 44400) { process_msg(msg, FALSE); } else if (num == 44402) { transparency = 1.0-llGetAlpha(mapside); if (msg != "") { list newlist = llCSV2List(msg); settingchild = []; while (newlist != []) { settingchild += (integer)llList2String(newlist,0); newlist = llDeleteSubList(newlist, 0,0); } } positionmarkers(); } else if (num == 44409) { settingchild = []; integer i; for (i=2; i<=llGetNumberOfPrims(); i++) { settingchild += i; llClearLinkMedia(i, 0); } process_msg(msg, FALSE); } }}
  18. I have now posted the dialogger script to the scripting library forum: http://community.secondlife.com/t5/LSL-Library/Dialogger-dialogs-using-prims/td-p/1006855
  19. If you want the text centered vertically, you can move the text down further by using a profile-cut tube, since the hovetext placement is based on the uncut object. I think this would be a good time for me to post dialogger to the scripting library. http://community.secondlife.com/t5/LSL-Library/Dialogger-dialogs-using-prims/td-p/1006855
  20. The new version will not fit in one message! It is split between this and the first reply. A hud containing this is available here // dialogger - dialogs using prims // To put a dialog prim on the screen, send a chat to channel 444 or a link message to 44400: // [/outchan] name,p,px,v // /outchan = (optional) / character followed by return chat channel number followed by space. (The [ ] are not part of the message) // name = field label or texture // p = location to place control (rotation: <lowerleft.x,lowerleft.y,upperright.x,upperright.y>) // px (rotation) = bounds or control type: // <1,0,0,0> texture (texture name in newtext) // <1,1,0,0> texture picker. Drop any full-perm texture on it to send its UUID as its value. // <2,0,0,0> on/off button green/red // <2,r,g,b> (0<(r,g,b)<1) menu button in color rgb // <3,lo,0,hi> 3 vertical sliders with a range from lo to hi // <3,lo,2,hi> 1 2-dimensional xy-slider and 1 vertical z slider with a range from lo to hi // otherwise <lowerlimit.x,lowerlimit.y,upperlimit.x,upperlimit.y> slider control in 1 or 2 dimensions // zero bounds for dimension not being used (except use 1 to force values to integers). // v = value (vector) to display. Scalar values are passed as <x,0,0> // // If name specifies a dialog prim that is already being displayed, that one is updated. // // An empty message clears all dialog prims (makes them invisible) // // Link messages are returned on 44401. Chat messages are also returned on outchan if specified above: // name = field label or texture // name:v // v = value (vector) to display. Scalar values are passed as <x,0,0> float version=0.4; float touchrate=0.3; debugout(string outstr) { //llOwnerSay(outstr); } integer controlbits = -1; // turn on the undocumented controls too integer mapside = 0; //vector light = <1,1,1>; //vector dark = <.2,.2,.3>; integer havecontrols = 0; vector newval; vector newst; integer hlisten; integer touchedside; vector touched; integer lasttouchedside; integer lastindex = -1; vector lasttouched; vector lastval; vector taper; vector shear; integer dialogactive; float transparency = 0.5; float minscale = .1; float dimpl = 1; integer transpmarker = 2; integer mychannel = 444; integer ochannel = 445; string page; list settingvalue; list settingchild; // child assigned to each settings item list settingminmax; list settingname; list settingbox; // <minx,miny, maxx, maxy> bounding box integer chatreply; integer primbankidx = -1; integer primsdesired; integer permissionsdesired; key chatsender; positionmarkers() { if (!dialogactive) return; integer i; //for (i=1; i<avmarker; i++) llSetLinkAlpha(i, 1.0 - transparency, ALL_SIDES); if (llGetListLength(settingname)) { llMessageLinked(LINK_THIS, 44403, "", ""); } for (i=0; i<llGetListLength(settingchild); i++){ integer child = llList2Integer(settingchild, i); rotation p = llList2Rot(settingbox, i); // <leftbottom.x, leftbottom.y, righttop.x, righttop.y> if (p == ZERO_ROTATION){ llSetLinkPrimitiveParamsFast(child, [PRIM_POSITION, <0,1,0>, PRIM_COLOR, ALL_SIDES, <0.5,0.5,0.5>, 0.1, PRIM_ROT_LOCAL, llEuler2Rot(<0,PI/2,0>), PRIM_TEXT, "", <0.5,0.5,0.5>, 0.1]); } vector v = llList2Vector(settingvalue, i); rotation px = llList2Rot(settingminmax, i); if ((px.z > px.x) && (px.s > px.y)) { vector vv = llList2Vector(settingvalue, i); newval.z = vv.y; } //debugout("positionmarkers: " + llDumpList2String([child,v,p,px],"|")); positionmarker(child, v, p, px, llList2String(settingname, i)); } if (havecontrols) { llTakeControls(controlbits, TRUE, TRUE); havecontrols = 0; } lastindex = -1; } float maxdelta = 0.05; float dragspeed = .1; float controlspeed = .01; initpage() { transparency = 1.0-llGetAlpha(mapside); debugout("init page"); settingname = []; settingbox = []; settingminmax = []; settingvalue = []; dialogactive++; // force markers to be cleared positionmarkers(); //llSetColor(light, mapside); llSetText("", ZERO_VECTOR, 0.0); dialogactive = 0; } string fmtv(vector v, integer siz) { integer n = (siz-4)/3; return "<" +fmtf(v.x,n) +"," +fmtf(v.y, n) + "," + fmtf(v.z,n) + ">"; } string fmtf(float f, integer siz) { string s=(string)f; integer n = llStringLength(s) - siz; if (n > 0) { if (!~llSubStringIndex(llGetSubString(s,-n,-1),".")) s = llDeleteSubString(s,-n,-1); } return s; } positionmarker(integer child, vector v, rotation p, rotation px, string newtext) // child = child id of control, // v = value (vector) to display // p = location to place control (rot: <lowerleft.x,lowerleft.y,upperright.x,upperright.y>) // px (rot) = bounds or control type // newtext = field label or texture { debugout("positionmarker: " + llDumpList2String([child,v,p,px,newtext],"|")); vector scale=llGetScale(); vector color=<1,1,1>; float alpha = 1.0 - transparency; vector mpos; vector msize; list plist; rotation rot = ZERO_ROTATION; string texture; integer texface = 0; if (p == ZERO_ROTATION){ // make it disappear llSetLinkPrimitiveParamsFast(child, [PRIM_POSITION, <0,1,0>, PRIM_COLOR, ALL_SIDES, <0.5,0.5,0.5>, 0.03, PRIM_ROT_LOCAL, ZERO_ROTATION, PRIM_SIZE, <.01,.01,.01>, PRIM_TEXT, "", <0.5,0.5,0.5>, 0.1]); return; } vector texoff; vector texrpt = <.7,.7,0>; float offmin = .3; mpos = <(p.x+p.z)/2, (p.y+p.s)/2, scale.z+(child*.01)+.02>; msize = <(p.z-p.x)*scale.x, (p.s-p.y)*scale.y, .01>; plist = [PRIM_TYPE, PRIM_TYPE_BOX, 0, <0,1,0>, 0.0, ZERO_VECTOR, <1,1,0>,ZERO_VECTOR]; if ((px.x == 1.0) && (px.z == 0.0)) { texrpt = <1,1,0>; if (px.y == 0.0) { texture = newtext; alpha = 1.0 - (transparency/3); } else if (px.y == 1.0) { texture = "1a9658ba-ce85-2eb4-d6b1-c79887b861a5"; } color = <1,1,1>; } else if ((px.x == 2) && (px.z < 2)) { // menu button vector prof=<.515,.75,0>; rot = <-0.707080, -0.707134, 0.000025, 0.000000>; msize = <(p.s-p.y)*scale.y, (p.z-p.x)*scale.x*8.4, .01>; //llOwnerSay("before "+(string)msize.x);////////// if (msize.x < .013) { prof.x=.7-msize.x; msize.x*=3; } else if (msize.x < .02) { prof.x=.68-msize.x; msize.x*=2; } else if (msize.x < .04) { prof.x=.68-msize.x*2.5; msize.x*=1.5; } else if (msize.x < .072) { prof.x=.68-msize.x*2.5; //msize.x*=1.2; } //llOwnerSay("after "+(string)msize.x);////////// //alpha = 1.0 - transparency; plist = [PRIM_TYPE, PRIM_TYPE_TUBE, PRIM_HOLE_DEFAULT, <.695,.8,0>, .95, ZERO_VECTOR, <1,.5,0>, <-.5,0,0>, prof, <0,1,0>, 1.0, 0.0, 0.0]; texface = 2; if (px == <2,0,0,0>) { // green for "on" or 1, red for "off" or 0 if (v.x) color = <0,1,0>; else color = <1,0,0>; } else { color = <px.y,px.z,px.s>; // use specified color } } else { // set the texture offset to place the dot in the right place. texture = "2ef039b7-931e-23e1-4c2e-0b9d90b1916b"; // mostly transparent with a yellow dot in the middle if (havecontrols == child) color = <1,.7,0>; if (px.x == px.z) { if (px.x == 1.0) { integer y = llRound(v.y); v.y = (float)y; newtext += " " + (string)y; } else { newtext += "\n" + fmtf(v.y,4); } texoff = <0, offmin-((v.y-px.y)*offmin*2/(px.s-px.y)), 0>; texrpt.x = .12; } else if (px.y == px.s) { if (px.y == 1.0) { integer x = llRound(v.x); v.x = (float)x; newtext += " " + (string)x; } else { newtext += " " + fmtf(v.x,4); } texoff = <offmin-((v.x-px.x)*offmin*2/(px.z-px.x)), 0, 0>; texrpt.y = .12; } else if ((px.x == 3) && (px.z < 3)) { texrpt.x = .12; texoff = <0, offmin - ((1.0 - ((v.z - px.y) / (px.s - px.y))) * offmin * 2 ), 0>; plist += [PRIM_TEXTURE, 2, texture, texrpt, texoff, PI/2]; newtext += "\n" + fmtv(v, 16); if (px.z == 0.0) { plist += [PRIM_TYPE, PRIM_TYPE_BOX, 0, <0,1,0>, 0.0, ZERO_VECTOR, <.33,1,0>, ZERO_VECTOR]; texoff.y = offmin - ((v.x - px.y) * offmin * 2 / (px.s - px.y)); plist += [PRIM_TEXTURE, 4, texture, texrpt, texoff, PI/2]; texoff.y = offmin - (( v.y - px.y) * offmin * 2/ (px.s - px.y)); } else if (px.z == 2.0) { string texture2 = "dede3802-362e-ed09-cf69-d7c8dd3412ef"; plist += [PRIM_TYPE, PRIM_TYPE_BOX, 0, <0,1,0>, 0.0, ZERO_VECTOR, <1,1,0>, <-.16,0,0>, PRIM_TEXTURE, 2, texture2, <.17,.7,0>, texoff, PI/2]; texoff = <offmin-((v.x-px.y)*offmin*2/(px.s-px.y)), offmin-((v.y-px.y)*offmin*2/(px.s-px.y)), 0>; texrpt.x = .7; msize.x *= .83; mpos.x += .16 * msize.x; } } else { texoff = <offmin-((v.x-px.x)*offmin*2/(px.z-px.x)), offmin-((v.y-px.y)*offmin*2/(px.s-px.y)), 0>; newtext += "\n" + fmtv(v, 16); } } // suppress text if it has more than 3 dashes (to exclude uuids, and allow the label to be suppressed by --foo-- if (llGetListLength(llParseStringKeepNulls(newtext,[],["-"])) > 3) newtext = ""; msize.x *= taper.x; msize.y *= taper.y; mpos.x = (mpos.x + shear.x - .5) * scale.x * taper.x; mpos.y = (mpos.y + shear.y - .5) * scale.y * taper.y; debugout(" v=" + (string)v + " mpos=" + (string)mpos + " texture " + texture); llSetLinkPrimitiveParamsFast(child, plist + [PRIM_POSITION, mpos, PRIM_COLOR, ALL_SIDES, color, alpha, PRIM_ROT_LOCAL, rot, PRIM_SIZE, msize, PRIM_TEXTURE, texface, texture, texrpt, texoff, 0.0, PRIM_TEXT, newtext, <1,1,0>, 1-(transparency*.75)]); } updatemarker(integer i, vector t, integer side) { integer child = llList2Integer(settingchild, i); rotation p = llList2Rot(settingbox, i); // <leftbottom.x, leftbottom.y, righttop.x, righttop.y> rotation px = llList2Rot(settingminmax, i); string newtext = llList2String(settingname,i); newst = t; newst.z = 0; if (px == <2,0,0,0>) { vector oldval = llList2Vector(settingvalue, i); if (oldval.x) { newval = <0,0,0>; } else { newval = <1,0,0>; } } else { lastindex = i; if (px.z >= px.x) { newval = <newst.x*(px.z-px.x)+px.x, newst.y*(px.s-px.y)+px.y, 0>; } else { if ((px.x == 3) && (px.z < 3)) { // 3-way control newval = llList2Vector(settingvalue, i); float s = px.s - px.y; if (!side) { newval.y = t.y * s + px.y; if (px.z == 2) newval.x = t.x * s + px.y; } else if (side == 2) newval.z = t.x * s + px.y; else if (side == 4) newval.x = (1.0 - t.x) * s + px.y; } else newval = <newst.x, newst.y, 0>; } } string outstr=newtext + ":"; if ((px.x == 1.0) && (px.y == 1.0) && (px.z == 0.0)) { key oldtex = llList2Key(settingvalue, i); key tex = llList2Key(llGetLinkPrimitiveParams(child,[PRIM_TEXTURE, side]),0); if (tex == "1a9658ba-ce85-2eb4-d6b1-c79887b861a5") { if (t != ZERO_VECTOR) tex = ""; // actual mouse click should clear it. else return; } outstr += (string)tex; settingvalue = llListReplaceList(settingvalue, [tex], i, i); } else { outstr += (string)newval; settingvalue = llListReplaceList(settingvalue, [newval], i, i); } positionmarker(child, newval, p, px, newtext); llMessageLinked(LINK_SET, 44401, outstr, ""); if (chatreply) llRegionSayTo(chatsender, ochannel, outstr); return; } process_msg(string msg, integer chatflag) { debugout("msg="+msg); if (msg == "") { initpage(); return; } if (!llGetListLength(settingname)) { dialogactive++; //llSetColor(dark, mapside); } if (llGetSubString(msg,0,0)=="/"){ integer x = llSubStringIndex(msg," "); ochannel = (integer)llGetSubString(msg,1,x-1); msg = llDeleteSubString(msg,0,x); } chatreply = chatflag; list blist = llParseString2List(msg, ["\n",";"],[]); while (blist != []) { list clist = llCSV2List(llList2String(blist,0)); blist = llDeleteSubList(blist, 0, 0); if (clist != []) { string newname = llList2String(clist, 0); if (llGetListLength(clist) > 2) { //transparency = 0.2; integer x = llListFindList(settingname, [newname]); string snewbox = llList2String(clist,1); rotation newbox = (rotation)snewbox; string snewminmax = llList2String(clist,2); rotation newminmax = (rotation)snewminmax; vector newvalue = (vector)llList2String(clist,3); if (~x) { if (snewbox != "") settingbox = llListReplaceList(settingbox, [newbox], x, x); if (snewminmax != "") settingminmax = llListReplaceList(settingminmax, [newminmax], x, x); settingvalue = llListReplaceList(settingvalue, [newvalue], x, x); } else { settingname += newname; settingbox += newbox; settingminmax += newminmax; settingvalue += newvalue; } } else { vector color; if (llGetListLength(clist) == 2) color = (vector)llList2String(clist,1); else color = <1,1,1>; llSetText(llList2String(clist,0), color, 1.0); } } } positionmarkers(); } newshape() { list newshapelist = llGetPrimitiveParams([PRIM_TYPE]); taper = llList2Vector(newshapelist, 5); shear = llList2Vector(newshapelist, 6); }
  21. If you need to send a list in a message, you can use llList2CSV or llDumpList2String. Unfortunately, the lsl functions that go the other way, llCSV2List and llParseString2List, produce a list of strings. list_cast solves the problem by converting each type into what it appears to be. list_cast can accurately recover the original type unless the original type was string and the contents are all digits (and possibly a .). There is/was another set of functions whose name escapes me that handles even that case.
  22. For me, Second Life is a creative platform — a place to make stuff.
  23. Update: dialogger is now available for beta test, along with primcontrol and charttracker. Details in this thread: http://community.secondlife.com/t5/LSL-Scripting/Free-primcontrol-HUD-Easy-Prim-Torture-Beta-2-Avaiable/m-p/1092569/highlight/true#M5485 We have all encountered the many limitations of llDialog. I am writing dialogger as an alternative of sorts. dialogger is a HUD, and/or code that can be added to other HUDs, to produce dynamic dialogs using prims. dialogger supports buttons in any color or texture (without the text length limitations of llDialog) and sliders, vertical, horizontal, or both. The sliders support clicking and dragging. Each control uses a single, unscripted, prim, which dialogger configures appropriately. The buttons are profile-cut tubes, so their text will appear on them, rather than above them. It is possible to make dialogger mostly disappear until it has dialogs to display. If it only needs to display text, it can do that while minimized. A single chat or link message is required to add each control to the display, and chat/link messages are returned with new values in response to mouse clicks and drags. Chat messages are accepted on channel 444 from the owner and owner's objects. An empty message clears all dialogs. This message would add the control "Fader" below: Fader,<.1,.55,.4,.9>,<0,0,10,10>,<7.81255,6.41469,0> The bottom toolbar is optional, and allows reset, transparency control, move/resize (no need to go into edit mode), and a dialog to add more prims to the hud or remove them (which requires dropping the HUD where you have rez permissions). dialogger is free, full-perm, and open-source. I will contribute the code to the scripting library if there is enough interest. dialogger and the toolbar are one lsl script each and can be used together or independently. Surely someone must have done something like this already. But if so, then where is it? Has anyone else at least played with using dimple/profile/path cut to adjust the position of hover text? My algorithm for that is fugly. Who would be interested in trying this out? I am also open to suggestions for improving this.
×
×
  • Create New...