Jump to content

Rolig Loon

Advisor
  • Content Count

    38,180
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Rolig Loon

  1. Take a look at the reply from Pavcules Superior in THIS THREAD, where I posed a similar question. Using llGetScale helps the sizing issue.
  2. It's all a matter of how the designer has set the flexi parameters. I'd suggest that you do some experiments. Make a copy of one of your skirts (assuming that you have mod/copy perms), wear it, and hop up on a pose stand. Then select the skirt, and open the "Features" tab in Edit. Click the "Edit Linked Parts" box and choose one prim in your skirt. Then try changing the Drag and Tension parameters. Making them smaller will make the prim less bouncy and more flyaway. Repeat the operation with each prim in the skirt. Then hop off the pose stand and see what it looks like. Play with the skirt, changing various numbers until you get a combination you like, then remember what you did so that you can do the same thing next time you buy a skirt and want to shange its bounciness.
  3. Leliel's answer is right on target. In addition, if you are using a public WiFi connection you will be competing for bandwidth with everyone else in the vicinity. SL demands a lot of bandwidth and tends to slow way down, freeze, or crash if it doesn't get what it needs, so WiFi is a poor choice compared to a hard-wired connection.
  4. From what I can see from a quick Google search, it appears to be a bug introduced in a recent Safari upgrade. From Apple user's forum, for example .... "This appears to be a bug/feature of Safari or one of the recent security updates. I am working on a web site where users download files and Safari is giving me this error. My production site also gives me this error and I would have noticed that earlier. It must be from the recent security update. The cause is when a web site broadcasts a "fake" link to a file. You click on the link and a script, behind the scenes, generates the appropriate HTTP headers for the file you can and sends said file back to the user. I guess technically the frame load is being interrupted."
  5. See the demo script I posted in the Scripting Library. It builds a menu of user options and an associated list of numbered button labels from information on a notecard, but you could build the list of options (in your case, avatar names) in any other way you like. The list of options is displayed in the dialog text and the button labels are the option numbers. BTW, you can get an avatar's first name from the login name by looking for the blank space between first and last names, as in .... integer idx = llSubStringIndex(llDetectedName(0)," "); string First_Name = llGetSubString(llDetectedName(0),0,idx-1);
  6. The 12-character limit on button labels in LSL dialogs can be frustrating for scripters. One way around it is to generate a numbered menu in the dialog text and then simply use the numbers as button labels. This script does just that, building on Void Singer's Multipage Dialog Pagination script, which displays 10 menu choices at a time in successive dialog pages. As written, this demo script reads a list of web site names and associated URLs from a notecard and then displays them as menu choices when the script is activated by touch. Each line on the notecard starts with a site name, followed by a "=" sign and then a URL. The script could obviously be used for any application where you want users to choose an action from a numbered list of options. //URL Chooser -- Rolig Loon -- February 2011 // Reads web site information from a notecard in the format Site name = http://www.a_great_URL.com // and presents result in a URL prompt. // Multipage dialog function uDlgBtnLst by Void Singer ( http://community.secondlife.com/t5/LSL-Scripting-Library/Dynamic-Multi-page-Dialog-AKA-Pagination/m-p/708119#M6 list uDlgBtnLst( integer vIntPag ) { integer vIdxBeg = 10 * (~-vIntPag); //-- 10 * (vIntPag - 1), enclose "~-X" in parens to avoid LSL bug integer vIdxMax = -~(~([] != gLstMnu) / 10); //-- (llGetListLength( gLstMnu ) - 1) / 10 + 1 list vLstRtn = llListInsertList( llList2List( gLstMnu, vIdxBeg, vIdxBeg + 9 ), //-- grab 10 dialog buttons (list)(" <<---(" + (string)(vIntPag + (-(vIntPag > 1) | vIdxMax - vIntPag)) + ")"), //-- back button -1 ) + //-- inserts back button at index 9, pushing the last menu item to index 10 (list)(" (" + (string)(-~((vIntPag < vIdxMax) * vIntPag)) + ")--->>"); //-- add fwd button at index 11 return //-- fix the order to L2R/T2B llList2List( vLstRtn, -3, -1 ) + llList2List( vLstRtn, -6, -4 ) + llList2List( vLstRtn, -9, -7 ) + llList2List( vLstRtn, -12, -10 ); } //-- Anti-License Text --//*/ // Contributed Freely to the Public Domain without limitation. //*/ // 2009 (CC0) [ http://creativecommons.org/publicdomain/zero/1.0 ] //*/ // Void Singer [ https://wiki.secondlife.com/wiki/User:Void_Singer ] //*/ //-- list gLstMnu; integer gLine; string gCard; integer gDChan; integer gDLisn; key gQuery; integer gCount; list Sites; list URLs; list gDlabels; default { state_entry() { if (llGetInventoryNumber(INVENTORY_NOTECARD) > 0) { gCard = llGetInventoryName(INVENTORY_NOTECARD,0); gQuery =llGetNotecardLine(gCard,0); gCount = 1; } else { llOwnerSay("No URL notecard detected."); } } changed (integer change) { if (change & CHANGED_INVENTORY) { llResetScript(); } } dataserver(key qID, string data) { if (qID == gQuery) { if (data != EOF) { integer idx = llSubStringIndex(data,"="); if (~idx) { Sites += [llStringTrim(llGetSubString(data,0,idx-1),STRING_TRIM)]; //Site names from NC URLs += [llStringTrim(llGetSubString(data,idx+1,-1),STRING_TRIM)]; //URLs from NC gDlabels += [(string)gCount + ". " +llStringTrim(llGetSubString(data,0,idx-1),STRING_TRIM) + " \n"]; //Dialog text gLstMnu += [(string)gCount]; // Button labels ++gCount; } gQuery = llGetNotecardLine(gCard,++gLine); } else { llSay(0,"Initialized."); state running; } } } } state running { changed (integer change) { if (change & CHANGED_INVENTORY) { llResetScript(); } } touch_start(integer num) { llSetTimerEvent(10.0); gDChan = (integer)("0xF" + llGetSubString(llDetectedKey(0),0,6)); gDLisn = llListen(gDChan,"","",""); string temp = ""; integer i; //Display the first 10 sites in dialog for (i=0;i<10;++i) { temp += llList2String(gDlabels,i); } llDialog(llDetectedKey(0),"Which site do you want to visit? \n"+ temp, uDlgBtnLst(1) ,gDChan); } listen (integer channel, string name, key id, string msg) { llSetTimerEvent(0.0); llListenRemove(gDLisn); // Has the user clicked either the ">>" or "<<" button? if (!llSubStringIndex( msg, " " )) //-- detects 2 (hidden) leading spaces { llSetTimerEvent(10.0); gDLisn = llListen(gDChan,"","",""); string temp = ""; integer menu = (integer)llGetSubString( msg, -~llSubStringIndex( msg, "(" ), -1 ); integer i; for (i=(10*(menu-1));i<(10*menu);++i) { temp += llList2String(gDlabels,i); } llDialog( id, "Which site do you want to visit? \n"+ temp, uDlgBtnLst(menu), gDChan ); } else // If user has clicked a numbered button { integer Choice = (integer) msg -1; llLoadURL(id,llList2String(Sites,Choice),llList2String(URLs,Choice)); } } timer() { llSetTimerEvent(0.0); llWhisper(0,"Timeout. Please close the dialog box on your screen."); llListenRemove(gDLisn); } } EDIT: Repaired indexing error in the listen event.
  7. Avoid making the object physical unless you really have to. It will add load on the sim's physics engine, and may be harder to manage than if you made it non-physical. If the object really has to be physical, I'd suggest not linking the parts to each other. Then, script the rotating part with llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y,FALSE) to make it rotate only around its Z-axis. Align its Z-axis with the hole in a torus (or anything with a hole), and be sure that your script is written to keep it aligned with that local axis if you turn the object.
  8. As a recent post to the Scripting forum pointed out, unpacker scripts scatter no-copy items all over your inventory. This can mean that you get a lot of IMs from frustrated and confused SL newbies who open one of your gift boxes and then can't find where everything went. There's no new magic to this short script -- you still have to give no-copy items individually, after all -- but it does send the new owner a friendly message that tells where to look for each unpacked item. list gItems; list gNocopy; list gList_types = [INVENTORY_NONE,INVENTORY_TEXTURE, INVENTORY_SOUND, INVENTORY_LANDMARK,INVENTORY_CLOTHING, INVENTORY_OBJECT, INVENTORY_NOTECARD, INVENTORY_SCRIPT,INVENTORY_BODYPART, INVENTORY_ANIMATION, INVENTORY_GESTURE]; list gList_names = ["None", "Texture", "Sound", "Landmark", "Clothing", "Object", "Notecard", "Script", "Body Part", "Animation", "Gesture"]; default { state_entry() { integer All = llGetInventoryNumber(INVENTORY_ALL); while (All) { string name = llGetInventoryName(INVENTORY_ALL, All - 1); if (name != llGetScriptName()) { if(llGetInventoryPermMask(name, MASK_OWNER) & PERM_COPY) { gItems += [name]; //Copy perm items } else { gNocopy += [name]; //No-copy perm items } } --All; } } changed (integer change) { if ((change & CHANGED_INVENTORY) || (change & CHANGED_OWNER)) { llResetScript(); } } touch_start(integer num) { llOwnerSay("Look for unpacked items in a folder named " + llGetObjectName() + " in your inventory."); llGiveInventoryList(llGetOwner(), llGetObjectName(), gItems); integer len = llGetListLength(gNocopy); if (len) { llOwnerSay("Also, look for the following one-of-a-kind items:"); while (len) { // Determine what kind of inventory this is, and find that type in the gList_types list integer idx = llListFindList(gList_types,[llGetInventoryType(llList2String(gNocopy,len-1))]); // Then use idx to find the name of that type in the gList_names list and say it if (~idx) { llOwnerSay(llList2String(gNocopy,len-1) + " will be in your " + llList2String(gList_names,idx) + " folder."); llGiveInventory(llDetectedKey(0),llList2String(gNocopy,len-1)); } --len; } } } }
  9. PosJump is working fine for me this morning and I haven't had any trouble recently. What does "not working properly" mean? It lands you at a strange destination? It doesn't TP you at all? PosJump will give you trouble if you have to pass through a No Entry parcel on the way to your destination, so you should use the safe version to at least prevent you from being thrown off world.
  10. The Scripting forum is meant as a place for scripters to learn from each other. It's not really a place to look for scripts. If you are looking for someone to write a script for you, the best place to ask is in the Inworld Employment section of the Commerce Forums (http://community.secondlife.com/t5/Inworld-Employment/bd-p/InworldEmployment). If you are looking for a script that already exists, try Marketplace or the LSL Scripting Library (http://community.secondlife.com/t5/LSL-Scripting-Library/bd-p/LSLScriptingLibrary) or the Wanted section of the Commerce forums (http://community.secondlife.com/t5/Wanted/bd-p/Wanted). You will have much better luck.
  11. This is a tough script to read. Style is a very personal matter and we each use whatever works best for us. Still, if it were my own script I wouldn't pack multiple functions on a single line. I'd find it hard to debug. Just sayin' .......... You'll need to include a dataserver event in your default state to read the notecard and a llGetNotecardLine function to trigger it. See the short example HERE.
  12. I've found that the best way to sell a script on Marketplace is to embed it in a notecard. That has the added benefit that you can include any description, instructions, or greetings in the same notecard and be sure that they will be stored together in inventory when the customer receives them. You can also include a LM to your in-world shop.
  13. I am out of town and away from my computer so there's no way I can test this, but I think you can get rid of that wonkiness by just dividing the variable rot where it appears in the two places in Kaluura's function by llGetRot(). You may also need to divide the quantity Hinge + (Door * rot) by llGetRot() as well. Of course, I could be wrong ..... :smileytongue:
  14. That;s true. That's why I put some weasly qualifiers in my post earlier. The prim does have to be fairly large and you can't move around faster than the script's response rate or you'll outrun the thing. Even then, it's not perfect. Still, it's a nice toy and it does draw your eye away from the annoying white dot most of the time.
  15. Or use Photoshop CS4 or CS5, both of which allow you to work on your design in 3D, so that you can paint directly on the avatar body. That will let you see exactly where the seams fall and make it easy to align and adjust patterns across them. If you don't have that capability, you'll have to do a lot of uploading temporary textures to SL (they are free if you use Phoenix or Imprudence, or if you upload to the Aditi grid), trying them on, photographing seams, and then adjusting. It can be slow work, but doable.
  16. Upload the template as a texture, apply it to a new shirt, and wear it. You'll see where all the lines go on the avatar body easily enough. Take a pile of photos from all different angles and save them on your hard drive for reference later.
  17. Well, yes.... You are sending a message on a channel that is equal to -1234 times a hefty number based on the sender's UUID but the receiving objectis listening for a message on channel -1234. It will never hear a thing If you want it to hear on channel -1234, you have to send on channel -1234 If you are dealing with unlinked objects, this is one way to change textures and colors. If your objects are linked, though, it is much better to use llSetLinkPrimitiveParamsFast to do the job It's faster, and you save the sim overhead on running several scripts when one will do
  18. Thanks, Peter. I've had this debate with myself many times over the years, and I usually come down on the side of pre-decrement, not for any rational reason but because it seems to be the way that my mind works. It just seems natural to me, so I seem to make fewer logical errors when I go that route. That's the essence of personal style, I suppose. (It also shows, perhaps, that I am a self-taught amateur instead of a properly-trained professional.) It does help to have the debate in the open occasionally, though, especially for the benefit of those who haven't made up their minds yet. :smileywink:
  19. You want to learn how to create a dialog menu? Take a look at THIS TUTORIAL. It's about the best one I've seen. As Peter says, we can't help much without seeing your script. Off the top of my head, though, the things that most commonly lead to a syntax error are Forgetting to open and close the scope of an event or condition test with { curly brackets }. It helps to indent each scope cleanly so that you can see where the brackets ought to be. Having unmatched parentheses (same problem as curly brackets). Having unmatched quotes around a string (same thing,...). Using the wrong variable type in a function (an integer where there should be a string, for example). There are others too, but those four are at the top of my D'uh list. I trip over at least one every day, despite best intentions. The best way to beat them is to be neat and consistent, and to use a good script editor that explains what your mistake was.
  20. I've heard the same myth. Some day, when I remember it in time, I'll have to test and see if there's some truth to it. This is not very high on my priorities, frankly. :smileyvery-happy:
  21. For what it's worth, I have had a version of that problem since I joined SL in 2007. I have to change a profile pic two or three times before the new one finally sticks. It's done that with every viewer I've used, so I figure it's just one of those fun, undocumented "features" of SL. (I know nothing about sidebar or chat icon pics, since I'm not using V2, but my guess is that those would do the same thing for me.)
  22. Well, there was only one small error and one oversight on my part. The error was in the end of the touch_start event. I used llGiveInventory to give a no-copy item and then tried to get its inventory type. That won't work, because the item is no longer in inventory at that point :smileytongue:, so I simply changed the order of the statements to make it work as advertised. The oversight --- the thing that made it not work for you -- is that I should have included a changed event that would reset the script if the inventory in the box changes. The script didn't work for you because you put the script in the box first, then added items and didn't reset the script. As a result, the setup sequence in the state_entry event never saw those items. The script thought the box was still empty. So, I fixed things by adding a changed event. Here's the repaired script, field tested. It works. :smileyhappy: list gItems;list gNocopy;list gList_types = [iNVENTORY_NONE,INVENTORY_TEXTURE, INVENTORY_SOUND, INVENTORY_LANDMARK,INVENTORY_CLOTHING, INVENTORY_OBJECT, INVENTORY_NOTECARD, INVENTORY_SCRIPT,INVENTORY_BODYPART, INVENTORY_ANIMATION, INVENTORY_GESTURE];list gList_names = ["None", "Texture", "Sound", "Landmark", "Clothing", "Object", "Notecard", "Script", "Body Part", "Animation", "Gesture"];default{ // Put this stuff in state_entry because you only need to do it once state_entry() { integer numberofitemsincontents = llGetInventoryNumber(INVENTORY_ALL); while (numberofitemsincontents) { string name = llGetInventoryName(INVENTORY_ALL, numberofitemsincontents - 1); if (name != llGetScriptName()) { if(llGetInventoryPermMask(name, MASK_OWNER) & PERM_COPY) { gItems += [name]; //Copy perm items } else { gNocopy += [name]; //No-copy perm items } } --numberofitemsincontents; } } changed (integer change) { if ((change & CHANGED_INVENTORY) || (change & CHANGED_OWNER)) { llResetScript(); } } touch_start(integer numberofagentstouching) { llOwnerSay("Look for unpacked items in a folder named " + llGetObjectName() + " in your inventory."); llGiveInventoryList(llDetectedKey(0), llGetObjectName(), gItems); integer len = llGetListLength(gNocopy); if (len) // That is, if len > 0 { llOwnerSay("Also, look for the following one-of-a-kind items:"); while (len) { // Determine what kind of inventory this is, and find that type in the gList_types list integer idx = llListFindList(gList_types,[llGetInventoryType(llList2String(gNocopy,len-1))]); // Then use idx to find the name of that type in the gList_names list and say it llOwnerSay(llList2String(gNocopy,len-1) + " will be in your " + llList2String(gList_names,idx) + " folder."); llGiveInventory(llDetectedKey(0),llList2String(gNocopy,len-1)); --len; } } }}
  23. Hmmmm... Well, I warned you that I hadn't had time to test it in world. :smileysurprised: It's probably something small. I'll take a look at it again this evening. Meantime, though, do keep poking at it. I always learn a lot by trying to figure out how someone else's script is supposed to work. Maybe you will too. (This is my way of trying to pass of my scripting error as a "learning experience." )
  24. As far as I've ever been able to tell, it's a randomly scheduled event, about once every week or so.
  25. It can only be minimized, not removed. The problem is an OpenGL issue, not a SL issue, except to the extent that SL has been largely built and textured by amateurs who don't know how to work around alpha sorting as they design. There's only so much that LL or the TPV developers can do.
×
×
  • Create New...