Jump to content

Sylvia Wasp

  • Content Count

  • Joined

  • Last visited

Everything posted by Sylvia Wasp

  1. Cool explanation as always. 🙂 Pictures really help too. Sylvia
  2. Cool. 🙂 I don't actually need it as "big as a house" but I was worried that they were somehow un-resizeable beyond the micro-realm as it were. Sylvia
  3. Thanks for the heads up, but I thought that worn items don't count as much as rezzed prims, no? I mean back in the day, everyone was walking around with jewellery made out of hundreds and hundreds of individual prims (ie - hundreds of LI if rezzed on the ground). Sylvia
  4. I'm considering getting into making jewellery and I need to buy some FP micro mesh for that purpose. The seller in question has a (rude IMO) 'no questions, no support, no refunds, no returns' kind of policy so I can't ask him the question before the purchase. The (stupid) question is ... I know "micro-mesh" is designed to be small, but how big can it actually get? Like, can I buy a "micro-mesh" item and then just drag the handles out until it's as big as a house? What would happen? What's the essential difference between "micro-mesh" and regular mesh anyway? Okay so I guess that's two questions lol. Sylvia 🙂
  5. Okay so I added the code because better safe than sorry 🙂 (thanks for the code BTW, awesome, simple and very clear as usual)... but you've only (slightly) convinced me of the necessity of the first check (for owner), and not really convinced me of the need for the second check (for creator) at all. Your problem with the ears seems to stem from two things that will never happen with my products, which are: - multiple HUDS by different creators for the same product. The only way I could see this happening is with Gacha (and I am opposed to Gacha on moral grounds, lol) - HUDs that are not uniquely named. (I would just never, ever do this) It also still seems to me that because I'm using this in the HUDs ... llRegionSayTo(llGetOwner(),cmdChannel, (string)index); ... that a HUD can only talk to the owner of the HUD, so if the HUD is owned by someone else, it can't communicate with anyone else. So it still seems to me that we're talking about griefers. Someone who's essentially made a hacked (illegal) version of my HUD that can talk to other owners. The second situation also seems to necessitate someone making a hacked (illegal) version of the HUD and the product, and that someone who normally buys my products has unwittingly instead purchased this shady product (or more likely "found" it in a sandbox). Both, extreme edge cases IMO, both requiring illegality, and in both cases the intention of the griefer would be to do a lot more damage than just ripping off my few silly products. More likely there would be some other nefarious code payload that would be the focus. Anyway ... adding them anyway!, (and thanks again), but I think we're really dealing with secret agent levels of security here. So here is the final, final listen code I got (for anyone following and wanting to reproduce the thing): listen(integer channel, string name, key id, string message) { list crown = llGetObjectDetails(id, [OBJECT_CREATOR, OBJECT_OWNER]); if ((llList2Key(crown, 0) != llGetCreator()) && (llList2Key(crown, 1) != llGetOwner())) return; integer index = (integer) message; string texture_key = llList2String(textures, index); llSetLinkPrimitiveParamsFast(2, [ PRIM_TEXTURE, ALL_SIDES, texture_key, <1.0, 1.0, 1.0>,ZERO_VECTOR, 0.0, PRIM_NORMAL, ALL_SIDES, texture_NRM, <2.0, 2.0, 2.0>,ZERO_VECTOR, 0.0, PRIM_SPECULAR, ALL_SIDES, texture_SPC, <1.0, 1.0, 1.0>,ZERO_VECTOR, 0.0,<1.0, 1.0, 1.0>, 51,0, ]); } I switched creator and owner around so it makes more sense with the variable name. thanks for all the help everyone! Sylvia
  6. Well, I might add it anyway since you're being so "passively aggressive" about it, lol. But it's literally adding yet another nesting if-else statement (the very thing I started out to avoid) just to absolutely rule out the minuscule chance that some griefer (who has read this thread BTW) hates me so much they are going to actively try to subvert my code, in order to play havoc with the textures on the 8 or 10 people who actually buy my clothes. I mean, I'm a small business and I operate at a loss. I only make the clothes so as to provide inexpensive, yet quality options for Tonic body users. It's more of an Anti-Capitalist action than a business, lol. Sylvia,
  7. Hmmm ... It seems like a very very very very very unlikely situation that you're talking about IMO. I mean I'm going to get a completely unique number almost every time despite the outside chance that two avatars *may* generate the same number. Also, we're already talking about active griefing rather than just covering off stupid mistakes, two avatars in the same room with the same product, or sloppy work on my part. Someone would have to do a lot of work to construct something just to screw around with another avatars clothing texture HUD, and why would they? Sylvia
  8. Yes, I discovered this in testing today. The whole thing stopped working and since the only thing that was changed is the NULL_KEY, I went back to the old version and it worked again. I think I'm just going to leave it the way it is (was) because I think having this at the top of the HUD code ... string HUD_Name = "some HUD"; integer cmdChannel; ... integer Key2Chan(key ID) { return 0x80000000 | (integer)("0x"+(string)ID); } and this in the Mesh code ... string HUD_Name = "some HUD"; integer cmdChannel; integer Key2Chan(key ID) { return 0x80000000 | (integer)("0x"+(string)ID); } ... default { state_entry () { cmdChannel = Key2Chan(llGetOwner()); llListen(cmdChannel, HUD_Name, NULL_KEY, ""); ... } ... does essentially the same thing. I'm already communicating between a named object on a secure channel that's specific to the user/owner of both objects. The HUD even names itself on startup so it can never be called anything else. The mesh can't listen for any other HUDs other than the named HUD, and the user would have to own both objects anyway. No other users should even be able to listen in on the same channel. I think that covers everything except ... "I've stupidly rezzed multiple copies of my own HUD all over my property and am just randomly clicking them now." Even in that case, the result would either be the very thing the user wanted, or it just wouldn't work at all AFAICS. Sylvia
  9. Done and Done. Both excellent ideas. One last thing that always secretly bothered me though ... I don't "handle" the listen in the mesh object. Is it really necessary for a simple thing like this? Should I be using a timer and deleting the listen after a set time? It seems like extra complication and also something that will get in the way of utility of the product itself. If the HUD stops working after x seconds or whatever, the user will be left thinking it's broken. Won't the listen just disappear by itself? Sylvia
  10. Thanks again, 🙂 For a visually oriented person the way in which it's displayed makes all the difference. For instance I looked at the key section for a long time and always saw it as: 3 * (Text_var + Alpha_var); not ( Text_var * 3) + Alpha_var; which would give: 3 * 0 + 0 = 03 * 0 + 1 = 33 * 0 + 2 = 63 * 1 + 0 = 33 * 1 + 1 = 63 * 1 + 2 = 93 * 2 + 0 = 63 * 2 + 1 = 93 * 2 + 2 = 123 * 3 + 0 = 93 * 3 + 1 = 123 * 3 + 2 = 153 * 4 + 0 = 123 * 4 + 1 = 153 * 4 + 2 = 183 * 5 + 0 = 153 * 5 + 1 = 183 * 5 + 2 = 7 Anyway, problem solved. The product will be finished in a day or two but anyone who contributed to this thread is welcome to a gift of anything in my store, although they're not likely to be of interest to all you math geeks, lol. Check it out if you need female avatar clothing for Tonic (objectively, the BEST mesh body) or Maitreya (the most POPULAR mesh body) https://marketplace.secondlife.com/stores/184651 Sylvia
  11. Cool pic, excellent illustration of what's happening. OK, so I took Molly's advice and put the calculations for the index in the HUD itself, which makes the code in the mesh even simpler. Here is my finished version of both the HUD code and the Mesh code. The only thing I can think of that may be wrong here is that I'm not "handling" the listen I guess. //===== Texture Changer (HUD code) - by Sylvia Wasp ==== string HUD_Name = "some HUD"; integer cmdChannel; integer Text_var; integer Alph_var; integer Key2Chan(key ID) { return 0x80000000 | (integer)("0x"+(string)ID); } default { state_entry () { llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_NAME,HUD_Name]); cmdChannel = Key2Chan(llGetOwner()); } touch_start(integer n) { integer button = (integer)llGetLinkName(llDetectedLinkNumber(0)); if (button >= 6) { Alph_var = button - 6; } else { Text_var = button; } integer index = 3 * Text_var + Alph_var; llRegionSayTo(llGetOwner(),cmdChannel, (string)index); } } //===== Texture Changer (Mesh code) - by Sylvia Wasp ====== string HUD_Name = "some HUD"; integer cmdChannel; integer Key2Chan(key ID) { return 0x80000000 | (integer)("0x"+(string)ID); } key label_tex = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; key trans_tex = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; list textures = [ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_01_90 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_01_80 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_01_60 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_02_90 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_02_80 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_02_60 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_03_90 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_03_80 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_03_60 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_04_90 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_04_80 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_04_60 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_05_90 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_05_80 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_05_60 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_06_90 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", //texture_06_80 "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" //texture_06_60 ]; default { state_entry () { cmdChannel = Key2Chan(llGetOwner()); llListen(cmdChannel, HUD_Name, NULL_KEY, ""); llSetLinkPrimitiveParamsFast(LINK_THIS,[ PRIM_TEXTURE, ALL_SIDES, trans_tex, <1.0, 1.0, 1.0>,ZERO_VECTOR, 0.0 ]); llSetLinkPrimitiveParamsFast(LINK_THIS,[ PRIM_TEXTURE, 0, label_tex, <-1.0, -1.0, 1.0>,ZERO_VECTOR, 0.0 ]); llSetLinkPrimitiveParamsFast(LINK_THIS,[ PRIM_TEXTURE, 5, label_tex, <1.0, 1.0, 1.0>,ZERO_VECTOR, 0.0 ]); } listen(integer channel, string name, key id, string message) { integer index = (integer) message; string texture_key = llList2String(textures, index); llSetLinkPrimitiveParamsFast(2,[ PRIM_TEXTURE, ALL_SIDES, texture_key, <1.0, 1.0, 1.0>,ZERO_VECTOR, 0.0 ]); } } This seems to work although it's late and I haven't tested it much. Sokay? Sylvia
  12. Okay, thanks for this. Here is my HUD code altered to match the idea, (I changed the variable names a bit and I had to cast the index as a string to send it) //===== Texture Changer (HUD) - by Sylvia Wasp ==== string HUD_Name = "some HUD"; integer cmdChannel; integer Text_var; integer Alph_var; integer Key2Chan(key ID) { return 0x80000000 | (integer)("0x"+(string)ID); } default { state_entry () { llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_NAME,HUD_Name]); cmdChannel = Key2Chan(llGetOwner()); } touch_start(integer n) { integer button = (integer)llGetLinkName(llDetectedLinkNumber(0)); if (button >= 6) { Alph_var = button - 6; } else { Text_var = button; } integer index = 3 * Text_var + Alph_var; llRegionSayTo(llGetOwner(),cmdChannel, (string)index); } } But this is what I mean about math, lol. I know this bit: integer index = 3 * Text_var + Alph_var; ... is *why* it works. But I don't exactly understand why it works. I will have to think about it for a (long) while. Sylvia
  13. Hey Molly, 🙂 This is pretty brilliant, but I honestly, think it's beyond me. It involves math, which for me is a no-no (I'm not dumb but I'm a very visually oriented person). It also requires me to figure out each individual HUD differently as I create them (although I guess I could create a series of HUDs with different button arrangements as templates?) As I said to Wulfie, re-usability and solving the problem 'once and for good' is key for me. TBH, I'm still trying to figure out that great solution you gave me for the listens in my avatar detector thingie, lol. I keep putting the code in the wrong place which stops the whole function of the scanner. Sylvia
  14. Thanks Wulfie, I have to admit I don't quite get this, (because math), but if I understand generally ... you're saying that I should keep the texture keys in a list and use the information sent by the HUD to generate indexes and thus pick the correct texture from the list? I usually just list the texture keys at the top of the script like this: key texture_02_80 = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; key texture_02_60 = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; key texture_03_90 = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; key texture_03_80 = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; key texture_03_60 = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; but putting them in an actual list makes a lot of sense. Re: the HUD, This is the entirety of my HUD code. It's very short and simple and allows me to re-use it over and over again. I just change the HUD_name variable and make sure the buttons are labelled correctly. It relies on a scheme wherein the button simply says it's name when clicked, like so: //===== Texture Changer (HUD) - by Sylvia Wasp ==== // installed in the root prim of a linkset // where the other prims are buttons labelled // "button_01", "button_02", etc. //================================================= integer cmdChannel; string HUD_Name = "some HUD"; integer Key2Chan(key ID) { return 0x80000000 | (integer)("0x"+(string)ID); } default { state_entry () { llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_NAME,HUD_Name]); cmdChannel = Key2Chan(llGetOwner()); } touch_start(integer n) { string button = llGetLinkName(llDetectedLinkNumber(0)); llRegionSayTo(llGetOwner(),cmdChannel, button); } } For me, this reusability is crucial as I don't have the skill to work out a new HUD for every piece of clothing. So you're suggesting (for the HUD) that instead of this bit: touch_start(integer n) { string button = llGetLinkName(llDetectedLinkNumber(0)); llRegionSayTo(llGetOwner(),cmdChannel, button); } That I detect the link number instead of the link name and send that to the clothing item instead? And then use that number to find things in the list of keys based on indexes? This makes a lot of sense also, but I'm not sure why I couldn't continue to use the button names, since they are logical and mostly numbers themselves (despite being technically strings of course). Also, is there not a way to pick a texture (a key) based on the naming convention I've used in my list of keys? I mean I can easily shorten the if-else trees that I normally use, if, instead of picking the texture key by it's full name, I can pick it though a concatenated string. Like instead of saying (essentially) "texture_01_90" if I could say "(Text_var + Alph_variable)" instead? Can I call a key just by using it's name (the name that I give it at the top of the file)? It seems to fail when I try. Sylvia
  15. Thanks Drago, but it's a picture HUD for changing dress textures. llDialog is not a good fit for that situation. Sylvia
  16. Well, because there are two sets of buttons and I want the choice in each set to "stick" as I said, one possible solution is to have six if-else checks for the six texture buttons with three if-else checks for the sheer buttons nested inside each one, so ... 18. Then the three if-else checks for the sheer buttons would each have six if-else checks nested inside them for the texture buttons, which is another 18. i.e - 36. Doing it that way, I'd have to probably add some other checks to account for conditions that are outside of what's expected too, so probably *more* than 36. The thing is, if you select a texture button, the HUD has to save the level of transparency/sheer selected (one of three options) to know which level of sheer texture to apply. The only way I can think of doing that is to have a variable that saves the level of transparency and another variable to save which of the six textures is currently selected. Then checking for those in the giant if else structure described. I think that would actually work, but it's long, kind of crazy, and I just think there has to be a better way. It's a pictorial HUD, so the user selects a fabric texture based on the six pictures and then they can fool around with the level or transparency/sheer. Because it's clothing however, I can't just adjust the alpha of the texture, I have to pre-prepare 18 detailed dress textures (3 levels of sheer for each pattern) and then pick one based on the user input from the buttons. Like, if the user selects "texture_02" and then selects a different sheer factor, the HUD needs to know that "we are on texture 2 right now" and select the texture_02 version of that sheer factor. If they then select "texture_03" instead, I need the HUD to remember that the sheer factor was 90 or 60 or whatever it happened to be and select the texture_03 version of that sheer level. I'm attaching a crude mockup of the HUD (below) to illustrate. Sylvia
  17. OK, I'm not a great scripter, so I'm probably going to phrase this incorrectly ... please have patience! I'm a clothing designer and I make & use HUDs to change the textures on the clothes. Up until now this has been just a simple array of 4, 6, 9 or 12 buttons, (one for each texture). Clicking the button on the HUD makes it shout it's name ("button_01", "button_02" etc.). The script in the clothing listens for the HUD. It has a list of keys (UUIDs) at the top and an if, else if structure that uses llSetLinkPrimitiveParamsFast to set the textures on the correct faces and so on depending on which button it heard. This works fine when there's one simple array of 12 or less buttons, but I'm now trying to make a HUD with two sets of buttons, one for choosing the pattern and one for setting the level of sheerness of the pattern. To be clear, I'm not talking about setting the Alpha of a texture, (I know how to do that) these are all still just textures but some of the textures have sheer areas. There are 6 fabric patterns and 3 levels of sheerness, so ... 18 textures in all. For clarity, I've labelled the keys to the textures things like, "texture_01_sheer_90", "texture_01_sheer_80", "texture_01_sheer_60", "texture_02_sheer_90" ... and so on But if I want the level of sheerness and the selected texture to "stick," then every time I press one of the six texture buttons, I have to test for three possible levels of sheerness' and every time I press a sheerness button I have to test for the six different patterns. This gives me (at minimum) a super unwieldy if-else tree that has 36 levels! It just doesn't seem like the right way to go. Even if I save the pattern choice (1 of 6) and the sheerness level (1 of 3) in variables, I still have to test for that variable and I'm still stuck with the super long unwieldy if-else structure. I'm sure this problem must have been solved before, can anyone point me in the right direction? Assuming I've made any goddamned sense at all, lol. Sylvia
  18. Yes, except for the fact that most people don't actually use their legacy names (sadly). The idea behind this scanner is that if you're in a room full of avatars and looking at the labels above their heads, what the scanner should return is what those labels say, so that the user can correlate the label on the button with the persons they see in front of them.
  19. thanks for this detail Wulfie. 🙂 Overall, though I don't see this as a problem, especially when the alternative is severely truncated names. The scanner is mostly for use at dances, shopping malls, etc. and let's face it, most avatars won't be using characters that cause any problems. The majority of avatars just use regular names in the language symbols of their home country in standard fonts available on most modern computers. Only a small sub-set of avatars will use "weird/interesting" characters from other languages and font sets (for the "cool" factor 🙂 ), and an even smaller subset of those will use characters that might cause a problem with the scanner. In testing, it seems that llBase64ToString deals with those rare cases very well. All the names I've seen on the buttons are clear and easily recognisable as the folks standing around me when I'm scanning.
  20. thanks Chic, I was worried that was the answer, but thanks anyway Seems to happen way more often with TGA's too for what it's worth.
  21. I've seen this happen on and off over the years and never heard of a good explanation, so here goes ... Basically, pictures (textures) that I've uploaded into inventory, (especially those I use in my profile), just randomly sometimes show up as blurred. They never resolve into an image. I've tried rebooting, changing graphics settings and all the typical things, but it isn't that. I have a good computer, I run on mostly Max settings etc. It's as if the server is just storing a low-res version and has dispensed with the actual file. This is NOT a transient problem. Once a texture gets blurred out, there seems no fixing for it. It never "comes back." I can download this textures out of SL and they show up as blurred on my desktop. It seems SL is just randomly scr*wing up my textures and no one seems to know why or how or what to do about it.
  22. Thanks KT. This is what I suspected (if I understand what you're saying here). That it might be possible to screen out the errant characters before they cause problems and hopefully, (again if I understand what you're saying), without having to cut the names down to un-recogniseable stubs of only 6 characters in length. The whole deal in what I'm trying to achieve is a bank of buttons with avatars names on them. If they aren't identifiable as the avatars standing around the user, then there isn't much point.
  23. Cool. Thanks a lot Molly. This is exactly what I need.
  24. Okay, so I wrote this script (with help from this very forum!) that lists out all the avatars in a sim and puts their names on a button dialogue. That may not seem useful but it's just a part of a bigger project. There are two problems with the script (if anyone wants to help out). 1) I clearly don't know what I'm doing with the listens, lol. every time I try to fix them so they are both created and deleted properly, I get "doubles" on the buttons, (every avatar name appears twice) so I've had to comment out most of it which is kind of bad practice (listens must be dealt with). 2) If there is some douchebag avatar in the sim with some fancy ass name with symbols and stuff in it, I get a script error something like, "buttons should only have so many characters dumbass," even though I've got code in here to stop that exact thing (see below). for (i = 0; i < number_of_keys; ++i) { thisKey = llList2Key(keys,i); if (thisKey != llGetOwner()) { detected_list += [ llRound(llVecDist(currentPos, llList2Vector(llGetObjectDetails(thisKey,[OBJECT_POS]),0))), llGetSubString(llGetDisplayName(thisKey), 0, 11), thisKey ]; } Only the names with the weird symbols in them sets off the error, so I'm thinking that somehow the Trademark symbol or the Copyright symbol or whatever stupid emoji it is, is functioning like an escape character or something? It rarely happens, and it only happens when some 8 foot tall toxic male with a ridiculous long name is in the sim, so it's probably just a single individual character that's doing it. Maybe it's being done on purpose? In any case, if anyone know if there is a way to limit the Unicode set, or identify the errant character and then check for it, or take it out before this happens I'd appreciate it. the entire script (so far) follows: integer cmdChannel; integer gMenuPos; integer gListen; list detected_list; list avatar_list; integer Key2Chan(key ID) { return 0x80000000 | (integer)("0x"+(string)ID); } multipage_dialogue() // replaces regular dialogue, deals with more pages { integer lastPage; list buttons; integer listLength = llGetListLength(avatar_list); if(gMenuPos >= 9) { buttons += " <----"; if((listLength - gMenuPos) > 11) { buttons += " ---->"; } else { lastPage = TRUE; } } else if (listLength > gMenuPos+9) { if((listLength - gMenuPos) > 11) { buttons += " ---->"; } else { lastPage = TRUE; } } else { lastPage = TRUE; } if (listLength > 0) { integer b_count; integer num_of_buttons = llGetListLength(buttons); for(b_count = gMenuPos + num_of_buttons + lastPage - 1 ; (num_of_buttons < 12) && (b_count < listLength); ++b_count) { buttons = buttons + [llList2String(avatar_list,b_count)]; num_of_buttons = llGetListLength(buttons); } } // gListen = llListen(cmdChannel,"","",""); llSetTimerEvent(10.0); llDialog(llGetOwner()," \n",buttons,cmdChannel); } default { state_entry() { cmdChannel = Key2Chan(llGetOwner()); llListen(cmdChannel, "", llGetOwner(), ""); } touch_start(integer total_number) { llListenRemove(gListen); llSetTimerEvent(0.0); gMenuPos = 0; avatar_list = ["SCAN", "Reset", "Done"]; detected_list = []; multipage_dialogue(); } listen( integer channel, string name, key id, string message ) { if( message == "SCAN" ){ avatar_list = []; llOwnerSay( "scanning for avatars within 96m ..." ); key thisKey; vector currentPos = llGetPos(); list keys = llGetAgentList(AGENT_LIST_REGION, []); integer number_of_keys = llGetListLength(keys); integer i; for (i = 0; i < number_of_keys; ++i) { thisKey = llList2Key(keys,i); if (thisKey != llGetOwner()) { detected_list += [ llRound(llVecDist(currentPos, llList2Vector(llGetObjectDetails(thisKey,[OBJECT_POS]),0))), llGetSubString(llGetDisplayName(thisKey), 0, 11), thisKey ]; } } detected_list = llListSort(detected_list, 3, FALSE); avatar_list = llList2ListStrided(llDeleteSubList(detected_list, 0, 0), 0, -1, 3); if (llGetListLength(avatar_list) < 1) { llSleep(1.0); llOwnerSay( "Sorry ... no other avatars found in this simulator"); return; } else multipage_dialogue(); } else if ( message == "Reset") { llResetScript(); } else if ( message == "Done") { // llListenRemove(gListen); } else if (~llSubStringIndex(message,"---->")) { gMenuPos += 10; multipage_dialogue(); } else if (~llSubStringIndex(message,"<----")) { gMenuPos -= 10; multipage_dialogue (); } else { llOwnerSay(message); // the (named) button you pressed llOwnerSay((string) llList2String(detected_list, (llListFindList(detected_list,[message]) + 1))); // that avatar's key multipage_dialogue (); } } timer() { llSetTimerEvent(0.0); // llListenRemove(gListen); } } thanks, Sylvia Wasp
  • Create New...