Jump to content

Quistess Alpha

Resident
  • Posts

    3,878
  • Joined

  • Last visited

Everything posted by Quistess Alpha

  1. Just as an example, you can also use LSL to construct JSON strings: string JSON; JSON = llJsonSetValue(JSON,["playlists",0,"id"],"ID_1"); JSON = llJsonSetValue(JSON,["playlists",0,"title"],"TITLE_1"); JSON = llJsonSetValue(JSON,["playlists",0,"description"],"DESC_1"); JSON = llJsonSetValue(JSON,["playlists",0,"playcount"],"6"); JSON = llJsonSetValue(JSON,["playlists",1,"id"],"ID_2"); JSON = llJsonSetValue(JSON,["playlists",1,"title"],"TITLE_2"); JSON = llJsonSetValue(JSON,["playlists",1,"description"],"DESC_2"); JSON = llJsonSetValue(JSON,["playlists",1,"playcount"],"8"); llOwnerSay(JSON);
  2. "test" is a string which contains no JSON data. instead try llJsonGetValue(test,["playlists",0,"id"]); Maybe try looking at it one level at a time (the indentation on all these examples is horrible) test is a JSON object containing one key value pair to fetch the "..." you descend one level and ask for the "playlists", the value of which is a JSON array, to descend one more level, you ask for an index. at index 0, the ... is a JSON object, and to get one of the ...'s you ask for the key, for example "id".
  3. my (limited) experience has been that for full-perm templates, the example textures are also full-perms. I guess I don't have much experience with 3rd-party modifications distributed as raw textures though.
  4. Uhm, Why are you trying to select a texture from your inventory window instead of the texture picker window? I just tested it and drag-drop from inventory onto the texture image in the build window works (Kokua viewer) though. ETA: Oh, I see. The problem is that the textures themselves have restrictive perms. You can add full-perm textures to worn attachments, but for no-mod textures you need to rez the attachment in-world.
  5. yeah, llDeleteSubString(llIntegerToBase64(llHash(key)),-2,-1); is good enough in practice, but the problem is the failure case is persistent. if some random person has 2 friends who magically fall in the same box, they're going to have a confusing bug and it won't fix itself no-matter what they do. I think a few bytes is probably worth not accidentally confusing someone if you distribute your toy widely. if you're just collecting data on passers-by to your sim or something, confusing 2 people probably isn't the end of the world.
  6. I change the texture on worn attachments all the time?
  7. Tangent, but last time I did that for a client, they complained about it leaving "ghost objects" behind. (The server didn't send nearby viewers a message that the object wasn't there anymore)
  8. FWIW, despite my very earlier comment that you couldn't (because LSD regex wasn't finished then), you can use '$' as an 'end of key' specifier: llLinksetDataFindKeys("-hiscore$"); similarly '^' as a beginning of key specifier ("^db-<packed_UUID>") PS. what key-packing method are you thinking of? because utf-8 is different/ more efficient than utf-16, @Mollymews's key-compression compresses a 36-character key to 27~25 bytes (variable depending on key) ; a llBase64 on each of the 4 encoded integers compresses to 24 bytes. The theoretical minimum is around 20~21 bytes.
  9. If I recall, llMoveToTarget has some ease-in/ease-out that make interpolation like that not-smooth. For long movements have you considered llSetKeyframedMotion() instead?
  10. to summarize, change that to llOwnerSay(json_type2string(llJsonValueType(test, []))); (ETA: as corrected by love below)
  11. We're thinking about the question differently. You're assuming the question is about dragging items from in-world into the inventory window, I'm assuming it's about dragging a set of items already in the inventory window into another folder. Items in the inventory can be shift-clicked or ctrl-clicked to select more than one at once. When multiple inventory items are selected at once, they can be dragged into another inventory folder to move them.
  12. I believe you can't remove your BOM underwear if you told SL your real age is under 18 when you made your account.
  13. You're not allowed to have a Skew+revolutions combination that would make the prim overlap with itself (even if it wouldn't actually overlap because of the 'radius' value).
  14. shift-click first and last items, or ctrl-click item by item, then drag.
  15. It just occurred to me that if you want/need to be careful about planning around this bug, you can llGetObjectDetails(ID,[OBJECT_ROOT]); the ID returned by llAvatarOnLinkSitTarget(); if the avatar's object_root is the same as the linksets root, then the avatar actually exists in the region and is, in fact, sitting on the object.
  16. I'd split "step one" into a few more granular steps: First you decide on "big picture" idea of how it works, "Ex. I want a Tree with leaves, when someone touches a leaf they get money . . ." with a few more broad "when this happens that happens; I want it to have a X thing that does Y". Then, you decide on a specific implementation for each of the broad ideas, converting general ideas into SL-specific terms: "Ex. The leaves will be separate SL temp-on-rez objects, XYZ will be presented as object-text on the tree etc." You'd be surprised at how many people seem to get stuck on: "I want to do X!" "You can't do X, why do you want to do X?" "Because that makes it look like Y is happening!" "So what if you did Z?" "But I really want to do X!" -- On specific implementation details, my go-to would be to have the leaves turn visible/invisible and be linked to the main tree rather than rezzing separate leaf objects. There are lots of pros/cons to any specific implementation method. Some projects just fall into place, other-times it's like a Sudoku with an accidental wrong answer filled in, so you keep jumping around choosing a different option until it all meshes together. ...
  17. Are you using a third party viewer? Kokua, Firestorm, Cool VL, and Catznip all seem to have notecard search functionality. I can't test any other viewers readily.
  18. No, but kindof. LSL's functions for scripted camera controls are a bit funky, because they seem to be mostly intended for people riding in vehicles. See https://wiki.secondlife.com/wiki/LlSetCameraParams
  19. strings are initialized to "", setting that is redundant. You'll want to remove old values from the key, there are many ways to make the protocol, but you could perhaps write some additional information into the value of the key to cleanse it of any old response.
  20. You need to have the the notecard as the 'active window', and perhaps the text-cursor line visible in the notecard (it does seem to also work on no-mod notecards). If not, it brings up a in-viewer web-browser with google as the homepage. (Kokua behavior only?)
  21. If you only care about who's sat and not on which links, you could always go back to: // number of avatars sat on the thing: llGetObjectDetails(llGetKey(),[OBJECT_SIT_COUNT]); // old method: llObjectPrimCount()-llGetNumberOfPrims(); // get their keys with llLinkKey(llGetNumberOfPrims()-avatar_index);
  22. Indeed, but either that of using multiple channels to disambiguate response types is ~usually the best option. If your second script can absolutely pinky-promise to send responses in a timely manner, waiting on a change to LSD caused by another script does seem like an interesting new paradigm.
  23. when you feed them "reasonable index values" the delete list/string functions will always return a list/string with fewer elements than it started with, sub list/string will return at least one element. In the edge case where your list/string has only one element, using the semantically wrong function can lead to unexpected results.
  24. integer chan = 17; integer dice_roll(integer n_dice, integer n_sides, integer add) { integer result; while(~--n_dice) { result+=(integer)llFrand(n_sides); } return result+add; } string owner_name; default { state_entry() { llListen(chan,"",llGetOwner(),""); owner_name = "secondlife:///app/agent/"+(string)llGetOwner()+"/inspect"; } listen(integer chan, string name, key who, string text) { list l = llCSV2List(text); string n = llList2String(l,0); string d = llList2String(l,1); string mod = llList2String(l,2); if (llGetListLength(l)==3) { llSay(0,owner_name+" rolls "+n+" d"+d+" and adds "+mod+".\nThe result is: "+ (string)dice_roll((integer)n,(integer)d,integer(mod))); } } } or so for "chat commands" on channel 17. (untested)
×
×
  • Create New...