Jump to content

Search the Community

Showing results for tags 'menu'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Important News
    • Announcements
  • People Forum
    • Your Avatar
    • Make Friends
    • Lifestyles and Relationships
    • Role Play
    • General Discussion Forum
    • Forums Feedback
    • Second Life Education and Nonprofits
  • Places and Events Forum
    • Favorite Destinations
    • Upcoming Events and Activities
    • Games in Second Life
  • Official Contests, Events & Challenges
    • Challenges
    • Contests
  • Creation Forum
    • Fashion
    • Art, Music and Photography
    • Animation Forum
    • Bakes on Mesh
    • Environmental Enhancement Project
    • Machinima Forum
    • Building and Texturing Forum
    • Mesh
    • LSL Scripting
    • Experience Tools Forum
  • Technology Forum
    • Second Life Server
    • Second Life Viewer
    • Second Life Web
    • General Second Life Tech Discussion
    • Mobile
  • Commerce Forum
    • Merchants
    • Inworld Employment
    • Wanted
  • Land Forum
    • General Discussion
    • Mainland
    • Linden Homes
    • Wanted
    • Regions for Sale
    • Regions for Rent
  • International Forum
    • Deutsches Forum
    • Foro en español
    • Forum in italiano
    • Forum français
    • 日本語フォーラム
    • 한국어 포럼
    • Fórum em português
    • Forum polskie
    • المنتدى العربي
    • Türkçe Forum
    • Форум по-русски
  • Answers
    • Abuse and Griefing
    • Account
    • Avatar
    • Creation
    • Inventory
    • Getting Started
    • Controls
    • Land
    • Linden Dollars (L$)
    • Shopping
    • Technical
    • Viewers
    • Everything Else
    • International Answers

Blogs

  • Commerce
  • Featured News
  • Inworld
  • Tools and Technology
  • Tips and Tricks
  • Land
  • Community News

Categories

  • English
  • Deutsch
  • Français
  • Español
  • Português
  • 日本語
  • Italiano
  • Pусский
  • Türkçe

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title

Found 23 results

  1. Hi I'm asking for help with a modification I made to Rolig's excellent multi-page Menu system which is in the LSL Script Library here: https://community.secondlife.com/forums/topic/181045-a-simple-multipage-dialog-menu-system/#comment-1382741 I am using it in a drone to select nearby avatars. I want it to return both the selected Av Name (displayed on the buttons) and also the associated UUID. To that end I modified her code to save name/uuid pairs, and to step through the 'Buttons' List in 2's rather than in 1's. It all works fine - as long as there are 9 or fewer avatars in range. If there are more and it needs to prepare a second menu 'page', it crashes with the following message broadcast to all: "llDialog: button labels must be 24 or fewer characters long". Clearly, and understandably, something is going wrong with the paging it seems to me. This is all at the edge of my understanding, so I tried some simple minded approaches like doubling her 9's and 11's to 18 and 22 respectively, but that didn't help. Days of trying to debug this are sending me bananas. So please, can anyone see where I've gone wrong here?! list gNames; integer gMenuPosition; // Index number of the first button on the current page integer gLsn; // Dialog Listen Handle list avatarsInRegion; key id; string name; list uListReverse( list vLstSrc ){ integer vIntCnt = (vLstSrc != []); while (vIntCnt){ vLstSrc += llList2List( vLstSrc, (vIntCnt = ~-vIntCnt), vIntCnt ); } return llList2List( vLstSrc, (vLstSrc != []) >> 1, -1 ); } Menu() { integer Last; list Buttons; integer All = llGetListLength(gNames); if(gMenuPosition >= 9) //This is NOT the first menu page { Buttons += " <----"; if((All - gMenuPosition) > 11) // This is not the last page { Buttons += " ---->"; } else // This IS the last page { Last = TRUE; } } else if (All > gMenuPosition + 9) // This IS the first page { if((All - gMenuPosition) > 11) // There are more pages to follow { Buttons += " ---->"; } else // This IS the last page { Last = TRUE; } } else // This is the only menu page { Last = TRUE; } if (All > 0) { integer b; integer len = llGetListLength(Buttons); len = len/2; // This bizarre test does the important work ...... //for(b = gMenuPosition + len + Last - 1 ; (len < 12)&&(b < All); ++b) for(b = gMenuPosition + len + Last - 1 ; (len < 12)&&(b < All); b=b+2) { Buttons = Buttons + [llList2String(gNames,b)]; len = llGetListLength(Buttons); } } gLsn = llListen(-12345,"","",""); llSetTimerEvent(30.0); // integer i; // integer length = llGetListLength(Buttons); // do // llOwnerSay(llList2String(Buttons, i) ); // while(++i < length); llDialog(llGetOwner(),"Targets within range:\n", Buttons, -12345); } default { // ---------------------------- S Y S T E M F U N C T I O N S ---------------------------- listen(integer channel, string name, key id, string msg) // Listens to and services all menu buttons. { llListenRemove(gLsn); llSetTimerEvent(0.0); if (~llSubStringIndex(msg,"---->")) { gMenuPosition += 10; Menu(); } else if (~llSubStringIndex(msg,"<----")) { gMenuPosition -= 10; Menu(); } else { //Do whatever the selected button directs..... your choice integer n = llListFindList(gNames, [msg]); if(~n) { // shorthand for "if it is an item in the list". If it is, key k = llList2Key(gNames, n + 1);//find the next item, //and thus you have the avatar's uuid. list test = [msg]; gNames = uListReverse(gNames); integer NameIndex = llListFindList(gNames, test); NameIndex --; NameIndex = NameIndex / 2; //llOwnerSay("DEBUG MENU choice made at position " + NameIndex + " / " + msg + " / " + (string)k); llMessageLinked(LINK_THIS, NameIndex, msg, k); } } } timer() { llSetTimerEvent(0.0); llListenRemove(gLsn); } link_message(integer sender_num, integer num, string msg, key id) // Services request for targeting from main script. { if (msg == "target" && num ==0 ) // if num==0 ie if sending script was 'Drone 166' { llListenRemove(gLsn); gMenuPosition = 0; gNames = []; llSensor("", NULL_KEY, AGENT, 96.0, PI); } } sensor( integer detected ) // Assembles list of Avatars detected by sensor function. { while(detected--) { gNames = gNames + llDetectedName(detected) + llDetectedKey(detected); } Menu(); } } Thank you for your thoughts.
  2. Hi I've been trying to incorporate bits into a texture change script (from wiki) so that I can set the parameters of the texture application via a notecard, but after adding the notecard bits into the script, the texture doesn't apply at all. The lines in my notecard are: gFace: ALL_SIDES gRepeats:<1.0,1.0,1.0> gOffsets:<1.0,1.0,1.0> gRotationInDegrees: 0.0 Anyone able to point out which part I got wrong please? Thanks so much. string notecardName; integer notecardLine; key query; list MENU1 = []; list MENU2 = []; integer listener; integer MENU_CHANNEL = 1000; integer gFace; vector gRepeats; vector gOffsets; float gRotationInDegrees; Dialog(key id, list menu) { llListenRemove(listener); listener = llListen(MENU_CHANNEL, "", NULL_KEY, ""); llDialog(id, "Select texture below: ", menu, MENU_CHANNEL); } default { state_entry() { notecardLine = 0; notecardName = llGetInventoryName(INVENTORY_NOTECARD,0); if (notecardName != "") { llOwnerSay("Getting configuration data..."); query = llGetNotecardLine(notecardName,notecardLine); } else { llOwnerSay("There is no notecard in object's inventory, please add a config notecard."); } } changed(integer change) { if (change & CHANGED_INVENTORY) // If notecard changes script is resetted. { llOwnerSay("Resetting script"); llResetScript(); } } on_rez(integer number) { llResetScript(); } touch_start(integer total_number) { llSay(0, "Touched: "+(string)total_number); } dataserver(key requested, string data) { if (requested == query) { if (data != EOF) { //ignore lines that start with # and blank lines if ( (llGetSubString(data,0,0) != "#") && (data != "") ) { list tempData = llParseString2List(data,[":"],[]); string command = llToLower(llList2String(tempData,0)); if (command == "gFace") { gFace = llList2Integer(tempData,1); llOwnerSay(command + ": " + (string)gFace); } else if (command == "gRepeats") { gRepeats = (vector)llList2String(tempData,1); // This converts a string to a vector // Set up the vector properly// gRepeats.x = gRepeats.x; gRepeats.y = gRepeats.y; gRepeats.z = gRepeats.z; llOwnerSay(command + ": " + (string)gRepeats); } else if (command == "gOffsets") { gOffsets = (vector)llList2String(tempData,1); // This converts a string to a vector // Set up the vector properly// gOffsets.x = gOffsets.x; gOffsets.y = gOffsets.y; gOffsets.z = gOffsets.z; llOwnerSay(command + ": " + (string)gOffsets); } else if (command == "gRotationInDegrees") { gRotationInDegrees = llList2Float(tempData,1); llOwnerSay(command + ": " + (string)gRotationInDegrees); } } notecardLine++; query = llGetNotecardLine(notecardName,notecardLine); } else { //End of notecard reached, we go to the ready state. state ready; } } } } state ready { on_rez(integer num) { // reset scripts on rez llResetScript(); } touch_start(integer total_number) { integer i = 0; MENU1 = []; MENU2 = []; // count the textures in the prim to see if we need pages integer c = llGetInventoryNumber(INVENTORY_TEXTURE); if (c <= 12) { for (; i < c; ++i) MENU1 += llGetInventoryName(INVENTORY_TEXTURE, i); } else { for (; i < 11; ++i) MENU1 += llGetInventoryName(INVENTORY_TEXTURE, i); if(c > 22) c = 22; for (; i < c; ++i) MENU2 += llGetInventoryName(INVENTORY_TEXTURE, i); MENU1 += ">>"; MENU2 += "<<"; } // display the dialog Dialog(llDetectedKey(0), MENU1); } listen(integer channel, string name, key id, string message) { if (channel == MENU_CHANNEL) { llListenRemove(listener); if (message == ">>") { Dialog(id, MENU2); } else if (message == "<<") { Dialog(id, MENU1); } else { // display the texture from menu selection llSetPrimitiveParams([PRIM_TEXTURE, gFace, message, gRepeats, gOffsets, gRotationInDegrees*DEG_TO_RAD] ); } } } timer() { llListenRemove(listener); llSetTimerEvent(0.0); } }
  3. I have just up graded to a new Mesh body, Had some expert help I understand quite a few of the fundamentals. I am on SL viewer running on a mac.I am having a problem not being able to see menus from objects like Jaquzzis, beds, sofas etc. If I have a friend with me they can see and operate the menus with no problems. This issue is not just on a specific simm. I think the problem is specific to my Avi. Yes its the same with both oder pose ball driven and newer menu driven furniture.
  4. I have an multi give object dialog menu. Menu recognize names in contents of prim and convert names to a button The problem is if the names are too long I get an 24 character error How can I shorten names on button but still give item when recognize full name to give item on the button? HERE IS THE SCRIPT list object_list; list object_list2; key user = NULL_KEY; composelist() { integer currentobject = 0; integer totalobjects = llGetInventoryNumber(INVENTORY_OBJECT); if(totalobjects > 0 & totalobjects <= 12) { object_list = []; do { object_list = object_list + llGetInventoryName(INVENTORY_OBJECT, currentobject); currentobject++; } while (currentobject > 0 & currentobject < totalobjects); } if(totalobjects > 12 & totalobjects <= 22) { object_list = ["Next Page"]; do { object_list = object_list + llGetInventoryName(INVENTORY_OBJECT, currentobject); currentobject++; } while (currentobject > 0 & currentobject < 11); object_list2 = ["Last Page"]; do { object_list2 = object_list2 + llGetInventoryName(INVENTORY_OBJECT, currentobject); currentobject++; } while (currentobject >= 11 & currentobject < totalobjects); } if(totalobjects > 22) { llWhisper(0, "You may only have a maximimum of 22 Objects. Please remove any extra ones."); } if(totalobjects == 0) { llWhisper(0, "Please add up to 22 Objects to give away. They should be Copy/Transfer."); } } //The Menu integer menu_handler; integer menu_channel; menu(key user,string title,list object_list) { menu_channel = (integer)(llFrand(99999.0) * -1); //random channel menu_handler = llListen(menu_channel,"","",""); llDialog(user,title,object_list,menu_channel); llSetTimerEvent(30.0); //menu channel open for 30 seconds } default { state_entry() { composelist(); //make list from inventory objects } touch_start(integer total_number) { user = llDetectedKey(0); if (user == llGetOwner()) { menu(user,"\n\nPlease select one below.",object_list); } else { llInstantMessage(user,"These items are for the owner only, sorry."); } } listen(integer channel,string name,key id,string message) { if (channel == menu_channel) { if(message == "Next Page") { menu(user,"\n\nPlease select one below.",object_list2); } else if(message == "Last Page") { menu(user,"\n\nPlease select one below.",object_list); } else { llGiveInventory(user,message); //Give Object llSetTimerEvent(0.0); llListenRemove(menu_handler); } } } timer() //Close the Menu Listen or we'll get laggy { llSetTimerEvent(0.0); llListenRemove(menu_handler); } changed(integer change) { if (change & CHANGED_INVENTORY) //inventory has changed { llSleep(0.5); composelist(); //rebuild the list } } }
  5. Hi I found a really great full perm freebie animation/pose HUD script on the mp by Vlad Blackburn. Since most pose names are longer than 12 characters, I'm trying to make it so that the buttons can be numbers and the name of the poses appear as a list above the buttons. I've been working off a script example provided in the below thread. https://community.secondlife.com/forums/topic/38305-dialog-choices-from-numbered-buttons/ https://community.secondlife.com/forums/topic/432512-recipe-dialog-menu/ I'm having a lot of trouble but I know my approach is way off - I've just been trying to copy & paste bits from one script into another. Can anyone help point me in the right direction or is this too much for a noob and I should just go into the Wanted section? 😔 Here's the original animation HUD script: float timeout = 60.0; key owner; list animation_names; list animation_buttons; integer animations_count; string animation; integer listener; integer page; GetAnimations () { animation_names = []; animation_buttons = []; animations_count = llGetInventoryNumber (INVENTORY_ANIMATION); integer index = 0; while (index < animations_count) { string name = llGetInventoryName (INVENTORY_ANIMATION, index++); animation_buttons += llGetSubString (name, 0, 23); animation_names += name; } } Menu () { if (animations_count) { string text = "\n" + llList2String (["Currently playing \"" + animation + "\"\n\n", "" ], animation == "") + "Select an animation:"; list buttons; integer start = 0; integer end = ~-animations_count; if (animations_count > 9) { integer pages = end / 7; if (page < 0) page = pages; else if (page > pages) page = 0; if (page == pages) start = animations_count - 7; else end = (start = page * 7) + 6; buttons = ["<<"] + llListInsertList (llList2List (animation_buttons, start, end), (list) ">>", 1); text += "\n\n(" + (string) (-~start) + " to " + (string) (-~end) + " of " + (string) animations_count + ", page " + (string) (-~page) + " of " + (string) (-~pages) + ")"; } else buttons = llList2List (animation_buttons, start, end); llDialog (owner, text, ["END", llList2String (["STOP", " "], animation == ""), " "] + buttons, StartDialog ()); } else llDialog (owner, "\nNo animations found.", ["END"], StartDialog ()); } integer StartDialog () { integer channel; listener = llListen (channel = (integer) llFrand (-1999000001.0) - 1000000, "", owner, ""); llSetTimerEvent (timeout); return channel; } EndDialog () { llSetTimerEvent (0.0); llListenRemove (listener); } StartAnimation (integer index) { StopAnimation (); llStartAnimation (animation = llList2String (animation_names, index)); } StopAnimation () { if (animation) { llStopAnimation (animation); animation = ""; } } default { state_entry () { owner = llGetOwner (); GetAnimations (); if (llGetAttached ()) llRequestPermissions (owner, PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS); } attach (key id) { if (id) llRequestPermissions (id, PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS); } run_time_permissions (integer permissions) { if (!(permissions & PERMISSION_TRIGGER_ANIMATION)) { llPlaySound ("d5567c52-b78d-f78f-bcb1-605701b3af24", 1.0); llOwnerSay ("You must give permission for this " + llGetObjectName () + " to animate your avatar for it to work!"); llResetScript (); } if (permissions & PERMISSION_TAKE_CONTROLS) llTakeControls (CONTROL_ML_LBUTTON, FALSE, TRUE); } changed (integer change) { if (change & CHANGED_INVENTORY) GetAnimations (); else if (change & CHANGED_OWNER) llResetScript (); } touch_end (integer count) { EndDialog (); Menu (); } listen (integer channel, string name, key id, string message) { EndDialog (); if (message != "END") { integer index; if (~(index = llListFindList (animation_buttons, (list) message))) StartAnimation (index); else if (message == "STOP") StopAnimation (); else if (message == "<<") --page; else if (message == ">>") ++page; Menu (); } } timer () { EndDialog (); llPlaySound ("d5567c52-b78d-f78f-bcb1-605701b3af24", 1.0); llDialog (owner, "\n" + llGetObjectName () + " menu timeout.", ["END"], -1); } }
  6. Hi I've been trying to set up rezzers for decor purposes so I can change to different scenes via clicking, and I've been working with this script, most of which was from the sl forum archive. The problem I'm having is that when I have more than one rezzer, touching one seems to affect the others. For example, if I had two rezzers, and I click on rezzer 1, rezzer 2 will somehow recognise that it has been touched (when it has not), and it will run the dialog menu and try and rezz out the object as well. How can I make this script work independently regardless of how many other rezzers are present? What I'm trying to do is have one rezzer for a table, another for the deck, etc. list MENU1 = []; list MENU2 = []; integer listener; integer MENU_CHANNEL = 1000; string mainMenuDialog = "\nWhich settings would you like to access?\nClick \"Close\" to close the menu.\n\nYou are here:\nMainmenu"; list mainMenuButtons = ["sub 01", "sub 02", "Close"]; string subMenu_01_Dialog = "\nClick \"Close\" to close the menu.\nClick \"-Main-\" to return to the main menu.\n\nYou are here:\nMainmenu > sub 01"; list subMenu_01_Buttons = ["action 01a", "action 01b", "Close", "-Main-"]; string subMenu_02_Dialog = "\nClick \"Close\" to close the menu.\nClick \"-Main-\" to return to the main menu.\n\nYou are here:\nMainmenu > sub 02"; list subMenu_02_Buttons = ["action 02a", "action 02b", "Close", "-Main-"]; integer dialogChannel; integer dialogHandle; Dialog(key id, list menu) { llListenRemove(listener); listener = llListen(MENU_CHANNEL, "", NULL_KEY, ""); llDialog(id, "Select one object below: ", menu, MENU_CHANNEL); } open_menu(key inputKey, string inputString, list inputList) { dialogChannel = (integer)llFrand(DEBUG_CHANNEL)*-1; dialogHandle = llListen(dialogChannel, "", inputKey, ""); llDialog(inputKey, inputString, inputList, dialogChannel); llSetTimerEvent(30.0); } close_menu() { llSetTimerEvent(0.0);// you can use 0 as well to save memory llListenRemove(dialogHandle); } default { on_rez(integer num) { llResetScript(); } touch_start(integer total_number) { integer i = 0; MENU1 = []; MENU2 = []; integer c = llGetInventoryNumber(INVENTORY_OBJECT); if (c <= 12) { for (; i < c; ++i) MENU1 += llGetInventoryName(INVENTORY_OBJECT, i); llShout(-193245,"Clean_Your_Room"); //Tell Rezzed prim to Go Away llSleep(0.5); //Give Prim A chance to go Away close_menu(); } else { for (; i < 11; ++i) MENU1 += llGetInventoryName(INVENTORY_OBJECT, i); if(c > 22) c = 22; for (; i < c; ++i) MENU2 += llGetInventoryName(INVENTORY_OBJECT, i); MENU1 += ">>"; MENU2 += "<<"; llShout(-193245,"Clean_Your_Room"); //Tell Rezzed prim to Go Away llSleep(0.5); //Give Prim A chance to go Away close_menu(); } Dialog(llDetectedKey(0), MENU1); } listen(integer channel, string name, key id, string message) { if (channel == MENU_CHANNEL) { llListenRemove(listener); if (message == ">>") { Dialog(id, MENU2); } else if (message == "<<") { Dialog(id, MENU1); } else { // todo add offsets so box sites perfect on rezzer llRezAtRoot(message, llGetPos(), ZERO_VECTOR, llGetRot(), 0); } } } }
  7. Hello, I am fairly new to lsl scripting, but have some programming experience. I am currently working on a project that includes some dialog menus, which are more complicated than any I have previously worked on. Functionally, the code is working (as far as I can tell), but I'm wondering if there is any way to streamline or simplify what I've written. The attached diagram is supposed to show how the menus are organized, sorry if it's confusing. Basically, the part that gets really really long is the control flows associated with levels B and C. For each choice in level B (B1 - B10) there are 15 options (C1 - C15). My question is: Does anyone have an example script of a multilevel menu with a lot of options associated with each level? I'm trying to see if anyone has a better way of handling the control flow. I can attach some examples of my code if that would be helpful, and I am also looking at the lsl libraries online. Thanks! *In Level A of the diagram, that's supposed to be A11 (A eleven), not the word "All".
  8. Hello! Trying to create a door script with a menu to open in three stages. open, half open and closed. How to do it better? What is responsible for the rotation of the object in this case? This is not for the home but photographic backgrounds.
  9. Hello! How to add an option to the menu script to add people to the list of those who are allowed to use this menu? This is for the wearable object, so that I can choose who else can call the menu besides me. Please help! list MENU_MAIN = ["BUT1", "BUT2" , "Add Person" , "Remove Person"]; //up to 12 in list integer menu_handler; integer menu_channel; menu(key user,string title,list buttons) { llListenRemove(menu_handler); //BugFix 5/2008 menu_channel = (integer)(llFrand(99999.0) * -1); menu_handler = llListen(menu_channel,"","",""); llDialog(user,title,buttons,menu_channel); llSetTimerEvent(30.0); //how long to wait for user to press a button before giving up and closing listen } default { state_entry() { //nada } touch_start(integer total_number) { menu(llDetectedKey(0), "\nText for Menu.", MENU_MAIN); } listen(integer channel,string name,key id,string message) { if (channel == menu_channel) { llListenRemove(menu_handler); //close listen llSetTimerEvent(0); //stop timeout timer if (message == "BUT1") { // DO SOMETHING } else if (message == "BUT2") { // DO SOMETHING } else if (message == "Add Person") { // WHAT TO DO HERE???.. } else if (message == "Remove Person") { // AND WHAT TO DO HERE??? } //else if (message == "Button") //{ // DO SOMETHING //} } } timer() //VERY IMPORTANT menu timeout { llListenRemove(menu_handler); //close listen llSetTimerEvent(0); //stop timeout timer } }
  10. Hello! I am trying to make light script with the menu so that it activates on the chat command, but something does not work. where I was wrong, tell me please! vector LIGHT_COLOR = < 1.0, 1.0, 1.0 > ; //Light color integer LIGHT_PRIM = LINK_THIS; //LINK_SET or prim number integer LIGHT_FACE = 0; //light face <<<<<<<<<<< list MENU_MAIN = ["MIN","MID","MAX","ON","OFF","DELETE"]; integer menu_handler; integer menu_channel; menu(key user,string title,list buttons) { llListen(10,"","",""); llListenRemove(menu_handler); menu_channel = (integer)(llFrand(99999.0) * -1); menu_handler = llListen(menu_channel,"","",""); llDialog(user,title,buttons,menu_channel); llSetTimerEvent(30.0); //how long to wait for user to press a button before giving up and closing listen } default { state_entry() { llListen(10,"","",""); } listen(integer channel,string name,key id,string msg) { if(msg=="glow") { menu(llDetectedKey(0), "\nText for Menu.", MENU_MAIN); } if (channel == menu_channel) { llListenRemove(menu_handler); //close listen llSetTimerEvent(0); //stop timeout timer if (msg == "MIN") { llSay(0, "Min Light"); llSetLinkPrimitiveParamsFast(LIGHT_PRIM, [PRIM_GLOW, LIGHT_FACE, 0.25, PRIM_POINT_LIGHT, TRUE, LIGHT_COLOR // START COLOR , 0.25 // START INTENSITY , 5.0 // START RADIUS , 1.0 // START FALLOFF ]); } else if (msg == "MID") { llSay(0, "Mid Light"); llSetLinkPrimitiveParamsFast(LIGHT_PRIM, [PRIM_GLOW, LIGHT_FACE, 0.50, PRIM_POINT_LIGHT, TRUE, LIGHT_COLOR // START COLOR , 0.5 // START INTENSITY , 10.0 // START RADIUS , 0.5 // START FALLOFF ]); } else if (msg == "MAX") { llSay(0, "Max Light"); llSetLinkPrimitiveParamsFast(LIGHT_PRIM, [PRIM_GLOW, LIGHT_FACE, 1.00, PRIM_POINT_LIGHT, TRUE, LIGHT_COLOR // START COLOR , 1.0 // START INTENSITY , 20.0 // START RADIUS , 0.0 // START FALLOFF ]); } else if (msg == "ON") { llSay(0, "Light is ON"); llSetLinkPrimitiveParamsFast(LIGHT_PRIM, [PRIM_GLOW, LIGHT_FACE, 1.00, PRIM_POINT_LIGHT, TRUE, LIGHT_COLOR // START COLOR , 1.0 // START INTENSITY , 20.0 // START RADIUS , 0.0 // START FALLOFF ]); } else if (msg == "OFF") { llSay(0, "Light is OFF"); llSetLinkPrimitiveParamsFast(LIGHT_PRIM, [PRIM_GLOW, ALL_SIDES, FALSE, PRIM_POINT_LIGHT, FALSE, ZERO_VECTOR // COLOR , 0.0 // INTENSITY , 0.0 // RADIUS , 2.0 // FALLOFF ]); } else if (msg == "DELETE") { llSay(0, "Script Deleted"); llRemoveInventory(llGetScriptName()); } //else if (msg == "Button") //{ //do something //} }} timer() //VERY IMPORTANT menu timeout { llListenRemove(menu_handler); //close listen llSetTimerEvent(0); //stop timeout timer } }
  11. Hey guys! Sorry about my English, it's not my first language. But I'm learning with script. I want make sure it's only private clickable for only two user, for example, Jane and John only clickable and everyone can't click. Please tell me how make it private clickable for two users only. list buttons = ["Kisses", "Hugs", "Snuggles"]; string dialogInfo = "\nPlease make a choice."; key ToucherID; integer dialogChannel; integer listenHandle; default { state_entry() { dialogChannel = -1 - (integer)("0x" + llGetSubString( (string)llGetKey(), -7, -1) ); } touch_start(integer num_detected) { ToucherID = llDetectedKey(0); llListenRemove(listenHandle); listenHandle = llListen(dialogChannel, "", ToucherID, ""); llDialog(ToucherID, dialogInfo, buttons, dialogChannel); } listen(integer channel, string name, key id, string message) { if (message == "Kisses") { llDialog(ToucherID, dialogInfo, buttons, dialogChannel); llSay(0, "John kissed Jane!"); } llListenRemove(listenHandle); if (message == "Hugs") { // process Red here llDialog(ToucherID, dialogInfo, buttons, dialogChannel); llSay(0,"John hugged Jane!"); } else if (message == "Snuggles") { // process Green here llDialog(ToucherID, dialogInfo, buttons, dialogChannel); llSay(0,"John snuggled Jane!"); } } }
  12. Hello Admin/Moderator/Guys, I wanna know how to make people cant inspect our items.. It's easy to inspect someone's clothing by right clicking their item n click inspect to know their item's brand.. I have a friend who always copy my style by inspect me again n again without permission i think, because tomorrow he will end up with the brands i worn So..I'm Firestorm user, is there a menu in firestorm viewer to block people's inspect? or a script, or any other way? Thank you /\
  13. Hello! I want to add a stop button to menu of this full length multi song player. how to do it if not difficult? // This list is all you need to edit. List the names of the songs (each collection of sound files that makes one song) // followed by the length of those sound clips (each song should contain clips of equal length) // The list should be structured like so - // list songs = ["Madonna", 9.2, "Jackson", 9.8]; // The names of the songs must be identical to some part of the sound files used for that song like so - //// In the prim inventory (along with this script) - ////// Jackson 1 ////// Jackson 2 ////// ... ////// Jackson 23 ////// Madonna_1 ////// Madonna_2 ////// ... ////// Madonna_23 ////// In the script - ////// list songs = ["Madonna", 9.2, "Jackson", 9.8]; // The script will play the clips in alpha/numerical order so name them wisely. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////ONLY EDIT BELOW HERE/////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// list songs = ["Madonna", 9.2, "Jackson", 9.8]; // YUP! EDIT THIS BIT ;-) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////ONLY EDIT ABOVE HERE/////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// integer volume = 10; integer lis_count; integer playing; integer busy; integer part; integer lis; integer sl; float delay; list cancel = ["CANCEL"]; list playlist; list waiting; list song; string vol_str = "Volume"; string song_str = "Songs"; string song_name; list StrideOfList(list src, integer stride, integer start, integer end) { list l = []; integer ll = llGetListLength(src); if(start < 0)start += ll; if(end < 0)end += ll; if(end < start) return llList2List(src, start, start); while(start <= end) { l += llList2List(src, start, start); start += stride; } return l; } list Volumes(integer vol) { integer v = 0; list l = []; do { if(v != vol) l += [((string)v)]; } while((++v) <= 10); return l; } PageOne(key k, integer c) { llDialog(k, "\nAdjust the volume or select a song to play?", [vol_str, song_str] + cancel, c); } PlaySong(string n) { song = []; integer c = -1; string name = ""; do { if(llSubStringIndex((name = llGetInventoryName(INVENTORY_SOUND, (++c))), n) != -1) song += [name]; } while(name); delay = llList2Float(songs, (llListFindList(songs, [n]) + 1)); if((sl = llGetListLength(song))) { llPreloadSound(llList2String(song, (part = 0))); if(sl > 1) llPreloadSound(llList2String(song, 1)); playing = FALSE; llSetTimerEvent(0.01); } } integer Chan() { return llRound((llFrand(-5000000.0) + -500000.0)); } float ScaleVol(integer v) { return (v * 0.1); } Listen(integer c, key a) { lis = llListen(c, "", a, ""); } RemoveListen(integer b) { llListenRemove(lis); lis_count = 0; if(b) busy = FALSE; lis = 0; } SetListenTimer(integer p) { if(p) while(((++lis_count) * llRound(delay)) < 30); else { lis_count = 1; llSetTimerEvent(30.0); } } integer CheckWaitingRoom(integer c) { if(waiting) { key a = llList2Key(waiting, 0); if(!c) { RemoveListen(0); Listen((c = Chan()), a); SetListenTimer(playing); } PageOne(a, c); waiting = llDeleteSubList(waiting, 0, 0); return 1; } return 0; } default { on_rez(integer param) { llStopSound(); llResetScript(); } changed(integer change) { if(change & CHANGED_INVENTORY) llResetScript(); } touch_start(integer nd) { while(nd) { key agent = llDetectedKey(--nd); if(!busy) { busy = TRUE; integer channel = Chan(); SetListenTimer(playing); Listen(channel, agent); PageOne(agent, channel); } else { list a = [agent]; if(llListFindList(waiting, a) == -1) waiting += a; } } } listen(integer chan, string name, key id, string msg) { if(msg != llList2String(cancel, 0)) { SetListenTimer(playing); if(msg == vol_str) { llDialog(id, "\nChange the volume?\nThe current volume is set at \"" + ((string)volume) + "\"", cancel + Volumes(volume), chan); return; } if(msg == song_str) { string current = ""; if(playlist) { current = "\n\nThe songs currently queued are\n\"" + llList2String(playlist, 0) + "\" (currently playing)"; if(llGetListLength(playlist) > 1) current += "\n\"" + llDumpList2String(llList2List(playlist, 1, -1), "\"\n\"") + "\""; } llDialog(id, llGetSubString(("\nSelect a song to play?" + current), 0, 500), cancel + StrideOfList(songs, 2, 0, -1), chan); return; } if(llListFindList(Volumes(volume), [msg]) != -1) { llAdjustSoundVolume(ScaleVol((volume = ((integer)msg)))); PageOne(id, chan); return; } if(llGetListLength((playlist += [msg])) == 1) PlaySong((song_name = msg)); } if(CheckWaitingRoom(chan)) return; RemoveListen(1); } timer() { if(playlist) { if(!playing) { llSetTimerEvent(delay); playing = TRUE; } llPlaySound(llList2String(song, part), ScaleVol(volume)); if((++part) == sl) { if(llGetListLength(playlist) > 1) { song_name = llList2String((playlist = llDeleteSubList(playlist, 0, 0)), 0); llSleep(delay); PlaySong(song_name); } else { llSetTimerEvent(0.0); song_name = ""; playing = FALSE; playlist = []; } } else if(part == (sl - 1)) llPreloadSound(llList2String(song, 0)); else llPreloadSound(llList2String(song, (part + 1))); } if(lis && (!(--lis_count))) { if(!(CheckWaitingRoom(0))) RemoveListen(1); } } }
  14. Hello! Can someone help to add stop button to menu of music player script? for now i think i need to add it : string song_name = "Stop"; ///// if(msg == song_stop){llStopSound();return;} // This list is all you need to edit. List the names of the songs (each collection of sound files that makes one song) // followed by the length of those sound clips (each song should contain clips of equal length) // The list should be structured like so - // list songs = ["Madonna", 9.2, "Jackson", 9.8]; // The names of the songs must be identical to some part of the sound files used for that song like so - //// In the prim inventory (along with this script) - ////// Jackson 1 ////// Jackson 2 ////// ... ////// Jackson 23 ////// Madonna_1 ////// Madonna_2 ////// ... ////// Madonna_23 ////// In the script - ////// list songs = ["Madonna", 9.2, "Jackson", 9.8]; // The script will play the clips in alpha/numerical order so name them wisely. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////ONLY EDIT BELOW HERE/////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// list songs = ["Madonna", 9.2, "Jackson", 9.8]; // YUP! EDIT THIS BIT ;-) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////ONLY EDIT ABOVE HERE/////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// integer volume = 10; integer lis_count; integer playing; integer busy; integer part; integer lis; integer sl; float delay; list cancel = ["CANCEL"]; list playlist; list waiting; list song; string vol_str = "Volume"; string song_str = "Songs"; string song_name; list StrideOfList(list src, integer stride, integer start, integer end) { list l = []; integer ll = llGetListLength(src); if(start < 0)start += ll; if(end < 0)end += ll; if(end < start) return llList2List(src, start, start); while(start <= end) { l += llList2List(src, start, start); start += stride; } return l; } list Volumes(integer vol) { integer v = 0; list l = []; do { if(v != vol) l += [((string)v)]; } while((++v) <= 10); return l; } PageOne(key k, integer c) { llDialog(k, "\nAdjust the volume or select a song to play?", [vol_str, song_str] + cancel, c); } PlaySong(string n) { song = []; integer c = -1; string name = ""; do { if(llSubStringIndex((name = llGetInventoryName(INVENTORY_SOUND, (++c))), n) != -1) song += [name]; } while(name); delay = llList2Float(songs, (llListFindList(songs, [n]) + 1)); if((sl = llGetListLength(song))) { llPreloadSound(llList2String(song, (part = 0))); if(sl > 1) llPreloadSound(llList2String(song, 1)); playing = FALSE; llSetTimerEvent(0.01); } } integer Chan() { return llRound((llFrand(-5000000.0) + -500000.0)); } float ScaleVol(integer v) { return (v * 0.1); } Listen(integer c, key a) { lis = llListen(c, "", a, ""); } RemoveListen(integer b) { llListenRemove(lis); lis_count = 0; if(b) busy = FALSE; lis = 0; } SetListenTimer(integer p) { if(p) while(((++lis_count) * llRound(delay)) < 30); else { lis_count = 1; llSetTimerEvent(30.0); } } integer CheckWaitingRoom(integer c) { if(waiting) { key a = llList2Key(waiting, 0); if(!c) { RemoveListen(0); Listen((c = Chan()), a); SetListenTimer(playing); } PageOne(a, c); waiting = llDeleteSubList(waiting, 0, 0); return 1; } return 0; } default { on_rez(integer param) { llStopSound(); llResetScript(); } changed(integer change) { if(change & CHANGED_INVENTORY) llResetScript(); } touch_start(integer nd) { while(nd) { key agent = llDetectedKey(--nd); if(!busy) { busy = TRUE; integer channel = Chan(); SetListenTimer(playing); Listen(channel, agent); PageOne(agent, channel); } else { list a = [agent]; if(llListFindList(waiting, a) == -1) waiting += a; } } } listen(integer chan, string name, key id, string msg) { if(msg != llList2String(cancel, 0)) { SetListenTimer(playing); if(msg == vol_str) { llDialog(id, "\nChange the volume?\nThe current volume is set at \"" + ((string)volume) + "\"", cancel + Volumes(volume), chan); return; } if(msg == song_str) { string current = ""; if(playlist) { current = "\n\nThe songs currently queued are\n\"" + llList2String(playlist, 0) + "\" (currently playing)"; if(llGetListLength(playlist) > 1) current += "\n\"" + llDumpList2String(llList2List(playlist, 1, -1), "\"\n\"") + "\""; } llDialog(id, llGetSubString(("\nSelect a song to play?" + current), 0, 500), cancel + StrideOfList(songs, 2, 0, -1), chan); return; } if(llListFindList(Volumes(volume), [msg]) != -1) { llAdjustSoundVolume(ScaleVol((volume = ((integer)msg)))); PageOne(id, chan); return; } if(llGetListLength((playlist += [msg])) == 1) PlaySong((song_name = msg)); } if(CheckWaitingRoom(chan)) return; RemoveListen(1); } timer() { if(playlist) { if(!playing) { llSetTimerEvent(delay); playing = TRUE; } llPlaySound(llList2String(song, part), ScaleVol(volume)); if((++part) == sl) { if(llGetListLength(playlist) > 1) { song_name = llList2String((playlist = llDeleteSubList(playlist, 0, 0)), 0); llSleep(delay); PlaySong(song_name); } else { llSetTimerEvent(0.0); song_name = ""; playing = FALSE; playlist = []; } } else if(part == (sl - 1)) llPreloadSound(llList2String(song, 0)); else llPreloadSound(llList2String(song, (part + 1))); } if(lis && (!(--lis_count))) { if(!(CheckWaitingRoom(0))) RemoveListen(1); } } }
  15. Hi everyone! Total noob here!!! I am trying to make a recipe board, which shows people different recipes (textures) depending on their choice in the menu. Now of cause there are more recipes released all the time, so I need to be able to add "unlimited" textures. That also means that I need to be able to change the main text (describing the buttons) on each page. The way my script is set up now, I run out of characters when adding new recipe names. The best way I learn is by having comments added to changes made in the script. At this point I am still figuring out how things work together and learning operators. So if I could ask questions after reviewing changes, that would be very helpful as well. https://pastebin.com/FPCeaZxg So if you are interested in helping a total noob, I would really appreciate it. I can pay a little
  16. Hello! Please help to create loop single sound script with volume control via pop-up menu. So far I managed to create this script, but maybe there is the way to simplify it? I will be grateful for any help! Thank you! list MENU_MAIN = ["100%VOL", "50%VOL" , "25%VOL" , "OFF"]; //up to 12 in list string sound = "a78fd32e-0179-437b-9a39-6b24916aa433"; integer menu_handler; integer menu_channel; menu(key user,string title,list buttons) { llListenRemove(menu_handler); //BugFix 5/2008 menu_channel = (integer)(llFrand(99999.0) * -1); menu_handler = llListen(menu_channel,"","",""); llDialog(user,title,buttons,menu_channel); llSetTimerEvent(30.0); //how long to wait for user to press a button before giving up and closing listen } default { state_entry() { //nada } touch_start(integer total_number) { menu(llDetectedKey(0), "\nText for Menu.", MENU_MAIN); } listen(integer channel,string name,key id,string message) { if (channel == menu_channel) { llListenRemove(menu_handler); //close listen llSetTimerEvent(0); //stop timeout timer if (message == "100%VOL") { llStopSound(); llLoopSound(sound, 1.0); } else if (message == "50%VOL") { llStopSound(); llLoopSound(sound, 0.5); } else if (message == "25%VOL") { llStopSound(); llLoopSound(sound, 0.25); } else if (message == "OFF") { llStopSound(); } //else if (message == "Button") //{ //do something //} } } timer() //VERY IMPORTANT menu timeout { llListenRemove(menu_handler); //close listen llSetTimerEvent(0); //stop timeout timer } }
  17. I rented a place. The place comes with a security orb. Somehow I messed it up and I cannot access the security orb menu. At first, it has a white band around it. When it was activated it had a green band. Now it has a red band around it and I cannot access its menu.
  18. I rented a place. The place comes with a security orb. Somehow I messed it up and I cannot access the security orb menu. At first, it has a white band around it. When it was activated it had a green band. Now it has a red band around it and I cannot access its menu.
  19. If I have multiple animation in an object's contents, will a menu appear when the user clicks on the object, so that they can select an animation. If not, what do I have to do? Thanks...
  20. Good morning everyone! Recently I have a problem ... I can not open menus of objects placed directly on a sim. What happens ... I press the object to open it, but it stays with my name engraved in it and without opening the menu that allows me to perform actions with the object; only lights up with my name and ... well it stays stuck without doing absolutely nothing. Has this happened to anyone? What solution did you find to bring up the menu of the object placed in the sim? Greetings and waiting for an answer, I pay attention to your comments.
  21. Buenas a todos! Reciente mente tengo un problema... no puedo abrir menús de objetos puestos directamente en un sim. Qué sucede... presiono el objeto para abrirlo, pero éste se queda con mi nombre grabado en él y sin abrir el menú que me permite realizar acciones con el objeto; solo se ilumina con mi nombre y... bueno se queda pegado sin hacer absolutamente nada. ¿A alguien le ha pasado esto? ¿Qué solución ha encontrado para que aparezca el menú del objeto puesto en el sim? Saludos y esperando respuesta, quedo atento a sus comentarios.
  22. Hello, recently I bought some attachements that only react to chat commands like /1? , /1text , /1reset and so on. So, to no longer just enter those commands, I would have liked to create a dialog menu where I can choose the individual objects and then click on a button that executes the command. I have little experience in LSL, so some (better: a lot of) assistance is required. hope you can help me
  23. I have a few objects that want to open two menus at the same time, but I can only get access to the last one given. How do I get access to all of them?
×
×
  • Create New...