Jump to content

DoteDote Edison

  • Posts

  • Joined

  • Last visited

Everything posted by DoteDote Edison

  1. There is a 60 second timeout if no response is received. From the wiki: Status 499 Requests must fully complete after 60 seconds, or else the response will be thrown away and the http_response status code will be 499. Besides the usual HTTP status codes, SL implements a special status code 499. This code isn't generated by the remote web server but by SL's servers (see Simulator_IP_Addresses), it can indicate: Request timeout (60 seconds)
  2. More of a question for the mesh section probably. If you made the mesh, check that the normals are inside-out? Also, check the LODs to ensure there isn't an LOD model that's incorrect. Seems that invisible meshes is common; search for "second life invisible mesh" for better advice. This is a link to an explanation about face normals: https://community.secondlife.com/forums/topic/437557-invisible-inside/
  3. Ah, that makes more sense. The process would be the same, just replace the llGetPos() in llVecDist with a second call to llGetObjectDetails(), only using your own id instead of the id from the listen() event. Basically, store your id/key into a global variable when the script starts using llGetOwner(). Each time the script hears something, get your position and the position of the speaker using llGetObjectDetails(), and use llVecDist() to get the distance between your position and the person speaking.
  4. Interesting question because if the script is attached to you and if it can only hear chat within 20m, and if you set it to ignore anything within 20m, then everything it hears will fall into the 20m range and thus be ignored. Nevertheless, to get the distance of the avatar speaking, use "list details = llGetObjectDetails(id, [OBJECT_POS])" to get their position. "id" is the key of the avatar returned by the listen() event. That function will return a single-item list, so convert to vector using "vector pos = llList2Vector(details, 0)". Then, do "float distance = llVecDist(llGetPos(), pos)" with llGetPos() as your position. "If (distance > 20.0) llOwnerSay()".
  5. I don't know the context of your situation, but one way is to use llGetAnimation(llGetOwner()) in an attached prim. SL default animations are; "Standing" if not sitting, "Sitting" if sitting on a prim, or "Sitting on Ground" if sitting on the ground. Of course, any AO usage will complicate the result. If the animation name is "Sitrting" then TRUE, you're on a prim, else if it's "Sitting on Ground", then FALSE, you're not sitting on a prim.
  6. You could minimize testing by only doing so when the matching CHARS index is not found (equals -1). The FURWARE script already performs that test but assigns index 68 (a "?") on NOT FOUND. Instead, use that opportunity to jump out of the loop and send a link message back to the referring script requesting a safe name.
  7. Like Wulfie says, the problem isn't LSL-related, it's just that the Furware Text font texture only includes certain characters, not a full set of every possible fancy character. You can see which characters are supported by viewing the entire font texture, or by outputting the CHARS string to chat like below. If the character doesn't exist in the set, you get a question mark. You can create your own font texture and replace the lesser-used characters with characters more commonly used in names, then update the CHARS string with the same new characters. Typically, the script is given a string to display, looks up each character in the CHARS variable to get its index, and calculates the texture scale/offset to frame that single character. abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,:;!?"'´`^~+-*/\|()[]{}<>=@$%&#_ àáâãäåæªçðèéêëìíîïñòóôõöøœºÞšßùúûüýÿžÀÁÂÃÄÅÆÇÐÈÉÊËÌÍÎÏÑÒÓÔÕÖØŒþŠÙÚÛÜÝŸŽ¢£€¥§µ¡¿©®±×÷·°¹²³«»¬…‹›– ¼½¾™•┌┬┐┏┳┓╔╦╗─╴╷╻ ┯▲◀▼▶○◔◑◕●├┼┤┣╋┫╠╬╣╺━╸│┃║┿↑←↓→↺↻☐☑☒└┴┘┗┻┛╚╩╝ ═ ╵╹ ┷┠╂┨↕↔♀♂⚠ℹ❌⌖∡⌛⌚♪♫ ♠♣♥♦⚀⚁⚂⚃⚄⚅✔✘☺☹■◾▬▮█
  8. Write the variable to the description of the prim, then llResetScript(). If you want to conceal that variable, write it, reset, then get description, then replace description with empty or whatever else. In other words, ditto to the comment above.
  9. What makes the angle at the pointer relative? I see you can get the angle - or bearing (pink line) - from the table to the person or the person to the table, but I'm not sure how you associate the seemingly arbitrary rotation angle of each individual object based on the other.... unless it's calculated based on the bearing angle between the two objects? Don't you need another variable such as: child forward is 50% of the angle between green and pink?
  10. This is a grid-offset game, so math can help. First, re-link them all properly so that the bottom left is link 2, then to the right is link 3, 4, 5, 6, and the next row up starts at 7 and so on. Now you can calculate the grid position of the touched prim. Set X and Y variables (or a vector) to store coords of the touched prim. vector.x = (linknum - 2)%5+1. The minus two compensates for the root prim and the plus one makes the grid start at 1,1. That gives X a value 1-5 per five columns. vector.y = llFloor((linknum-2)/5)+1. This gives Y value 1-5 with the bottom row at 1 and the top row at 5 (llFloor() rounds down). So now, every prim has unique coordinates. Assign coordinates to your "winning" prim too, then, as Wulfie suggests, use llVectDist() to calculate the distance between then touched prim coords and the winning coords. if that equals 0, then you have a winner, else colder the greater the distance.
  11. There's a way to do it, depending on the stream service/source and whether or not you can include a time parameter with the video url. Suppose you're watching a long youtube clip. With youtube, you can append &start=[seconds] to the url to indicate how many seconds into the clip to start. So, when a movie first plays, your script in SL would do a llResetTime(). That resets an internal script timer (not to be confused with the normal timer event). If a friend comes to the party 30-minutes late, you could program a "re-sync" button on your media player that calls llGetTime() - which would be the time in seconds since the script reset the time when the movie started. Using that time value, re-request the media url with the added &start=1800 (1800 secs = 30 minutes). The movie may glitch a bit for everyone else, and maybe replay a second or two, but worth it to have your late-coming friend in-sync with everyone else. For auto-switching, I think you'd need to either program the run-time for each clip and use the SL script to request a new url when the time is up... or depending on the streaming service, create a playlist on that service and play the playlist as the parcel media url. Check this link for Youtube's url parameters (note "playlist" and "start"): https://developers.google.com/youtube/player_parameters
  12. I commented out the user function and uncommented each llTargetOmega() separately... I'm in Morris Sandbox if you wanna stop by. Region Morris.
  13. I just finished a project that successfully calls llTargetOmega() in a timer(), so I took your script to Morris for testing. After 100 clicks, 50 first omega, and 50 second omega (with ChangeRotation() floated), it worked every time. Since this is client-side, I'm on the standard SL Viewer
  14. The simple solution is to A) append 1, 2, 3, etc. to the end of the button name as suggested above (fiddle with leading spaces to keep centered), or B) only use one button and apply the result to all receivers. As you stated, using UUIDs as button labels is meaningless to the user... well, two buttons that do two different actions but use the exact same label can also be meaningless. How would the user know which button goes to which item? Adding a number (or letter A, B, or anything) would help the user to differentiate the two buttons and it makes the scripting problem go away. In your unique scenario, if you really really needed to use multiple buttons with the 'same' label name... you could possibly substitute the "O" character with "0". For instance; "FOOD BOWL", "FOOD B0WL", "FO0D BOWL". But your initial thought is correct, there is no way to get two different actions from two identical messages.
  15. If you’re getting Stack Heap Overflow, you need to pinpoint where that occurs within the script. Add an llOwnerSay() as the first line of every event that will say the name of the event. Also add them to any user function, and at the beginning of every loop, right after the “for”, “do” or “while” line. if you add those everywhere, you’ll see in chat where the script was when it crashed. Insert more detailed llOwnerSays which output variables or llDumpListToString() if there’s a list. After the next crash, you should know exactly the cause.
  16. A user function probably exists somewhere, but the gist of the process is... Take each item from List A one by one and llListFIndList() for that item in List B. If found, remove and if it’s possible to have duplicates in the same list, scan List B again. Else, scan List C. Repeat with item two. After running through all items in List A, do the same with List B, but only llListFindList() in List C, since you already know there are no copies in List A. No need to process items in List C, or whatever is the last list, since its dupes would’ve been found in scans from previous lists. Probably best to start with the smallest list first, working towards the largest which, hopefully, won’t need to be processed at all.
  17. Lists are built on an index system, starting with index 0 (zero). The first item is located at index 0, the second at index one 1, third index 2, and so on. And since you are creating the script and list, you already know what type of data you’ve stored at each index (UUID, integeger, etc). To get a set of data, such as texture UUID, framesX integer, framesY integer... use llList2Key(). The index you request is based on the stride of the list (items that are a set).. Remember, computer counting starts at 0 instead of 1, so multiplying gifNumber (0) by the number of items in a set (4) will return the first UUID of the gif. To get the next item in the list - in the same set - add 1 after the multiplication (The location of the item in the set “plus” the location of next item). The third item would be + 2. The next set would be gifNumber (1) times (4), returning the 5th item in the list, which is the first item of the second set of data. key uuid; integer framesX; integer framesY; integer frames; integer gifNum = 0; uuid = llList2Key(textures, (gifNum*4)+0); framesX = llList2Integer(textures, (gifNum*4)+1); framesY = llList2Integer(textures, (gifNum*4)+2); frames = llList2Integer(textures, (gifNum*4)+3);
  18. Maybe I don’t understand what you’re trying to do, but I’m not sure why you need three lists. If the gifs are built into the textures properly, with all the frames on a single sheet as one texture, then you would only need one list. The frames data can be included in a single, strided, list. For example, [“UUID”, 4, 2, 8, “UUID”, 2, 2, 4, etc] For texture animations like that (combined into one texture), the frames X & Y should be the total frames across and down on the texture .. that’s how the size of each frame is determined by the system. if you’re using texture that are a single frame of the animation.. then you could use two lists, one with all texture UUIDs, the other with a series of index pairs indicating which UUID to start and stop on within the texture list.
  19. As Phate would have it... you can't move arbitrary objects into an item's inventory. However, if it fits your concept, there may be ways to pick up objects and put them into inventory. For example, if you're simulating something like an Easter Egg hunt and want people to be able to collect eggs in their attached basket. You could script a basket to request llAllowInventoryDrop() when the egg-hunter attaches it. Each egg you hide would have a replica egg inside its own inventory. The eggs could be scripted to llGiveInventory() to the hunter's basket when touched, then llDie() (or hide) the found egg. The eggs would need to learn the UUID of the basket first, either through communications or via llGetAttachedList() and llGetObjectDetails().
  20. I use Atom and it can also be linked to the in-world editor. To set an external editor, go to Advanced Menu->Show Debug Settings and type "externalEditor" in the upper space. In the lower space type the path to your installation plus "%s" like: C:\Users\<computer user name>\AppData\Local\atom\atom.exe "%s" Then, open a script and click the "Edit" button on the in-world script editor. The script will open in Atom (or whichever editor you choose) and still be linked to SL. So, when you save the script in the external editor, it's copied back to the in-world editor.
  21. You can also use a prim to indicate percentage... a bar-scale with a cube, or a pie-chart with a cylinder: // Bar Scale - Slice a BOX from 1.0 to 0.02 float hunger = 1.0; // 1.0 is 100% of 1 timer() { hunger -= 0.01; llSetPrimitiveParamsFast([PRIM_SLICE, <0.0, hunger, 0.0>]); } // Pie Chart - Cut a CYLINDER from 1.0 to 0.02 float hunger = 1.0; // 1.0 is 100% of 1 timer() { hunger -= 0.01; llSetPrimitiveParamsFast([PRIM_TYPE, PRIM_TYPE_CYLINDER, PRIM_HOLE_DEFAULT, <0.0, hunger, 0.0>, 0.0, ZERO_VECTOR, ZERO_VECTOR, ZERO_VECTOR]); }
  22. If a drawer and everything "inside" is linked as one object, then you only have to move the root. The entire link-set moves as one unit, so need need to use llMessageLinked() to control every individual prim separately. Even though Rolig uses llSetLinkPrimitiveParamsFast(), "LINK_THIS" means it's only "talking" to the root prim. Your old llMessageLinked() ascript is designed to work with multiple drawers all linked together as a single object. In that case, the script would need to control every linked prim individually, only only move the prims defined as part of a specific drawer. For llMessageLinked(), there would be another script in all the child prims that makes the child prim move when their number is called. On a side-note.. it be nice if we had a llSetSomePrimitiveParamsFast() function where we could define a start linknum and end linknum (or [] list of links) rather run through a loop with individual sends.
  23. I’m using Atom. It has all the qualities I need in a script editor. Dark themes, syntax highlighting, find/replace, and autocomplete for LSL and - more importantly - my variable & custom function names. Pleasant surprises are things like auto-quotes/brackets/parentheses; auto "", (), or [] a block-selection; block-selection indent in/out; {}, [], () pair highlight; and diff-pane; and the always-awesome mini-map overview to quickly scroll through code, show highlighted in-view/current line and highlight find/replace results. For LSL: Settings->Install->Search "LSL"->Install "language-lsl"... For other niceties, install: "minimap", "minimap-cursorline", "minimap-find-and-replace", and "split-diff"
  24. For multiple sentences in a string, like converting a notecard, you could try llParseString2List() with most common end of sentences as the spacers. Then, say the list as a string. string song = “mary had a little lamb. a little lamb... yes, a little lamb! you’ve heard this one before?”; list keepemseparated = llParseString2List( song, [], [“. “, “. “, “... “, “! “, “!! “, “? “, “:) “, “;) “]); integer i; integer j = llGetListLength(keepemseparated) - 1; while (i < j) { string s = llList2String(keepemseparated, i); s = llToUpper(llGetSubString(s, 0, 0)) + llGetSubString(s, 1, -1); keepemseparated = llListReplaceList(keepemseparated, , i, i); i += 2; } llOwnerSay((string)keepemseparated); Wonder if anyone’s made a code-typing-friendly keyboard for iOS yet. And why is it strike-through when I edit?
  25. Is the food yours, or did it come with the fridge? If it’s food you added to the fridge, test it by making a box, adding the food item, then the script below. Have your friend test it, and tweak food permissions (including contents of the food) until it works. If the food came with the fridge and you’re not able to modify permissions to the Scripts/contents inside the food... then contact the seller? default { touch_start(integer n) { //Give item named “Bacon” when touched llGiveInventory(llDetectedKey(0), “Bacon”); } }
  • Create New...