Jump to content

Search the Community

Showing results for tags 'dialog menu'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • People Forum
    • Your Avatar
    • Make Friends
    • Lifestyles and Relationships
    • Role Play
    • General Discussion Forum
    • Forums Feedback
    • Missed Connections
    • Second Life Education and Nonprofits
  • Places and Events Forum
    • Favorite Destinations
    • Upcoming Events and Activities
    • Games in Second Life
  • Official Contests, Events & Challenges
    • Challenges
    • Leap Into Love Snapshot Contest
  • Creation Forum
    • Fashion
    • Art, Music and Photography
    • Animation Forum
    • Bakes on Mesh
    • Environmental Enhancement Project
    • Machinima Forum
    • Building and Texturing Forum
    • Mesh
    • LSL Scripting
    • LSL Library
    • Experience Tools Forum
  • Technology Forum
    • Second Life Server
    • Second Life Viewer
    • Second Life Web
    • General Second Life Tech Discussion
  • Commerce Forum
    • Merchants
    • Inworld Employment
    • Wanted
  • Land Forum
    • General Discussion
    • Mainland
    • Linden Homes
    • Regions for Sale: Full Private Island
    • Region for Rent: Full Private Island
    • Regions for Sale: Homesteads
    • Region Rentals: Homestead
    • Parcels for Sale: Mainland
    • Parcels for Rent: Mainland
    • Wanted: Full Private Island
    • Wanted: Homesteads
    • Wanted: Mainland
  • 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
    • Форум по-русски
  • Adult Content Forum
    • Highlight Upcoming Events
    • General Discussion
    • General Announcements
  • 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


About Me

Found 4 results

  1. 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); } }
  2. 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); } }
  3. 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); } } } }
  4. 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".
×
×
  • Create New...