Jump to content

Quistess Alpha

Resident
  • Posts

    3,994
  • Joined

  • Last visited

Everything posted by Quistess Alpha

  1. to summarize, change that to llOwnerSay(json_type2string(llJsonValueType(test, []))); (ETA: as corrected by love below)
  2. 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.
  3. I believe you can't remove your BOM underwear if you told SL your real age is under 18 when you made your account.
  4. 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).
  5. shift-click first and last items, or ctrl-click item by item, then drag.
  6. 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.
  7. 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. ...
  8. 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.
  9. 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
  10. 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.
  11. 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?)
  12. 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);
  13. 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.
  14. 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.
  15. 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)
  16. Devil's advocate argument: If I know or expect something's going to be free tomorrow, I'm probably not going to buy it today. If I buy an expensive thing today and tomorrow it's free forever, with no warning, I might be a bit upset because that's not exactly fair. If there's a sufficient abundance of high-quality free things floating around, who's going to want to buy new things that are expensive? There's a decent argument to be had that giving away too much free stuff hurts people who want to sell things, and disincentivizes them from making anything at all. IMO, As a broad policy, it's not in the SL community or LL's interests to give out tons of free stuff. In moderation though, freebies are awesome; no ice-cream ever is sad. ice-cream for every meal will make you sick.
  17. If you have a notecard open, you can press ctrl-f to search for text inside of it. If you have a lot of notecards and you want to, for example, pick out which ones have the word "shakespear" in them, that's not possible. You would need to store all the notecards in some sort of external-to-SL database and perhaps use tools in SL to access the database in-world. If you don't have too many notecards, and you manually associate each one with a set of tags, (Ex. "Fiction" "Non-fiction" "Science"), or a classification system like Dewey Decimal, you might be able to make something work with only in-world scripting tools.
  18. I wasn't sure whether to make a new topic for this, but it's basically just applied rotation stuff so I'll dump it here. sun_position_user returns azimuth and elevation values to plug into the environment editor (you'll have to do the math to convert a real day of the year into my fantasy 360 day calendar ) sun_position_environment returns a rotation you can plug into llSetAgentEnvironment float gFrequency = 2.0; // 2.0 seems about the fastest it will allow float gLatitude = 50.0; // degrees from equator. integer gTime=-1; integer gDay; vector sun_position_user(float latitude, float day, float time) { // day ranges from [0-360); day 0 is september equinox, 90 winter solstice, 270 summer solstice // latitude in degrees from equator // time in hours; exactly 24 hours per day. (sun rises at 6.0 on the equinox, sets at 18.0) // return is <azimuth, elevation, 0>. (in degrees) latitude*= DEG_TO_RAD; vector axis = <0, llCos(latitude), llSin(latitude)>; //vector sun = <0, -axis.z, axis.y> + axis*(llSin(day*DEG_TO_RAD)*0.3987); vector sun = <0, axis.z, -axis.y> * llAxisAngle2Rot(<-1,0,0>,0.4101524*llSin(day*DEG_TO_RAD)) * llAxisAngle2Rot(axis,TWO_PI*-time/24.0); // .4101524 is the tilt of the earth's axis in radians. // sun now represents the position of the sun which we want to convert to az, elevation. vector ret = RAD_TO_DEG*<llAtan2(sun.y,sun.x),llAtan2(sun.z,llVecMag(<sun.x,sun.y,0>)),0>; if(ret.x<0) ret.x+=360.0; return ret; } rotation sun_position_environment(float latitude, float day, float time) { latitude*= DEG_TO_RAD; vector axis = <0, llCos(latitude), llSin(latitude)>; //llOwnerSay("Axis:"+(string)axis); vector sun = <0, axis.z, -axis.y> * llAxisAngle2Rot(<-1,0,0>,0.4101524*llSin(day*DEG_TO_RAD)) * llAxisAngle2Rot(axis,TWO_PI*-time/24.0); //llOwnerSay("Sun:"+(string)sun+":"+(string)time); return uVectorRoll2Rot(sun,0.0); } rotation uVectorRoll2Rot(vector v,float r) { return YPR2Rot(<llAtan2(v.y,v.x),-llAtan2(v.z,llVecMag(<v.x,v.y,0>)),r>); } rotation YPR2Rot(vector v) // Yaw Pitch Roll { return <llSin(v.z/2),0,0,llCos(v.z/2)> * <0,llSin(v.y/2),0,llCos(v.y/2)> * <0,0,llSin(v.x/2),llCos(v.x/2)> ; } default { state_entry() { llSetTimerEvent(gFrequency); llOwnerSay("Script start."); } timer() { ++gTime; if(gTime==24) { gTime=0; ++gDay; } list agents = llGetAgentList(AGENT_LIST_PARCEL,[]); integer i = llGetListLength(agents); while(~--i) { llRequestExperiencePermissions(llList2Key(agents,i),""); } } experience_permissions(key ID) { llSetAgentEnvironment(ID,gFrequency*0.95,[SKY_SUN,sun_position_environment(gLatitude,gDay,gTime),1.0,<0.1,0.1,0.1>]); // Update does not happen if the receiving viewer is in the middle of an environment change, so env. change speed must be faster than update frequency. //llOwnerSay((string)sun_position_user(gLatitude,gDay,gTime)); } experience_permissions_denied(key ID, integer reason) { llOwnerSay(llGetExperienceErrorMessage(reason)); } }
  19. with scripted changes, you can target agents who are within some boundary and who have accepted an experience. That seems sane enough to me?
  20. Agreed. mildly off-topic, but I would want any 'advanced gag standard' to end with text passed through the object. Wouldn't it be possible to just have something like "@gagspeak_finalchannel:20=n" or some-such, (where 0 is disallowed as a valid channel) and by-convention expect a user's collar/relay to implement the final output? while I'm badly theory-crafting something you've probably thought through much more than I have. . . "@gagspeak_..." : when any of these restrictions are in place, no user generated chat or emotes go to channel 0 nor @redirchat nor @rediremote channels. "@gagspeak_replace:search,replace,priority=add" : all substrings matching 'search' in user-speech (including quoted strings in emotes) get replaced with 'replace'. searches are done alphabetically and by length of string and are non-recursive. search/replace done in multiple passes for each priority. "@gagspeak_replaceword:search,replace=add" : all words (substrings surrounded by punctuation and or end/start of word) matching search replaced with replace. "@gagspeak_finalchannel:channel=add" : the garbled text produced by gagspeak_... restrictions output on this channel, the viewer only sends the output to the object which issued this restriction last (breaks RLV convention but. . .)
  21. If you have a set of sky settings, you can add a script like this and your settings (named in alphabetical order you want them to play) to an object on the parcel. The script needs to be compiled to an experience and the experience needs to be enabled on the land where it's running. float gFrequency = 5.0; // seconds between environment changes integer gIndexSky; string gEnv; default { state_entry() { llSetTimerEvent(gFrequency); } timer() { gIndexSky=(gIndexSky+1)%llGetInventoryNumber(INVENTORY_SETTING); gEnv = llGetInventoryName(INVENTORY_SETTING,gIndexSky); list agents = llGetAgentList(AGENT_LIST_PARCEL,[]); integer i = llGetListLength(agents); while(~--i) { llRequestExperiencePermissions(llList2Key(agents,i),""); } } experience_permissions(key ID) { llReplaceAgentEnvironment(ID,gFrequency,gEnv); //llOwnerSay("Debug: set env for "+(string)ID); } } Getting the sun/moon positions to line up in a pleasing way is actually quite tricky though. I didn't manage anything presentable while fooling around.
  22. While I'm thinking on it, the main cases where RLV devices don't work nicely together are gags(speech modification) and exceptions. Gags don't work nicely together because they operate in parallel rather than in series, and in order to put them in series, they would need to all conform to some common protocol which nobody has developed nor adopted widely. Exceptions are a bit less serious. If device A issues "@sendim=n" device B can 'get around it' by issuing "@sendim:<UUID>=add". this 'workaround' is blocked by '_sec' versions of relevant restrictions.
  23. possible, but for something that rapid, it would be easier to just send environment updates via script.
×
×
  • Create New...