Multiple Dialog
|
|
John Coakes
Registered User
Join date: 30 Mar 2007
Posts: 4
|
02-26-2008 01:45
Hi Scripters,
I have a question about the dialog menu's
Is it possible to open 1 dialog menu, that gives (as example) 3 options and those 3 options open its OWN dialog menu..
So not go level up in 1 dialog, but just close dialog menu remove blue dialog screen and opens an entirely different dialog menu..
Maybe its a impossible question lol but let me know if there is one of u scripters outthere that knows the answer.
Thanks
|
|
Beezle Warburton
=o.O=
Join date: 10 Nov 2006
Posts: 1,169
|
02-26-2008 01:57
From: John Coakes Hi Scripters,
I have a question about the dialog menu's
Is it possible to open 1 dialog menu, that gives (as example) 3 options and those 3 options open its OWN dialog menu..
So not go level up in 1 dialog, but just close dialog menu remove blue dialog screen and opens an entirely different dialog menu..
Maybe its a impossible question lol but let me know if there is one of u scripters outthere that knows the answer.
Thanks Yep, it's possible -- I see it all the time with color changing objects: Example: First Menu: 1)Red 2)Green 3)Blue Which opens one of the folowing: Red Menu 1)Maroon 2)Pink 3)Crimson Green Menu 1)Foam 2)Lime 3)Forest Blue Menu 1)Sky 2)Navy 3)Midnight When you click on the first dialog, it closes. Side note: There's now a "gotcha" with dialogs. Blue dialogs now display in reversed order https://jira.secondlife.com/browse/VWR-2010
_____________________
Though this be madness, yet there is method in't. -- William Shakespeare Warburton's Whimsies: In SLApez.biz
|
|
John Coakes
Registered User
Join date: 30 Mar 2007
Posts: 4
|
02-26-2008 03:04
No thats not what i mean u are talking about 1 script dialog menu I try to give example...
mainscript is called rootmenu.lsl that starts dialog with say 3 buttons when u click 3 it should start sub3menu.lsl
so when i click 1 it should close rootmenu.lsl clear the blue dialogmenu, and start sub1menu.lsl
etc etc
|
|
Arda Xi
Registered User
Join date: 23 Feb 2008
Posts: 2
|
02-26-2008 03:18
From: John Coakes No thats not what i mean u are talking about 1 script dialog menu I try to give example...
mainscript is called rootmenu.lsl that starts dialog with say 3 buttons when u click 3 it should start sub3menu.lsl
so when i click 1 it should close rootmenu.lsl clear the blue dialogmenu, and start sub1menu.lsl
etc etc it automatically closes the dialog when you click a button, and you just have to put listens up in sub1menu.lsl to respond to the buttons of rootmenu.lsl
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
02-26-2008 03:37
Example menu script with sub menus integer CHANNEL = 42; list MENU_MAIN = ["Hi", "Bye"];// main menu list MENU_OPTIONS = ["English", "Spanish", "Finished"]; // a submenu string message2;
default { state_entry() { llListen(CHANNEL, "", NULL_KEY, ""); }
touch_start(integer total_number) { llDialog(llDetectedKey(0), "What Do you want to say?", MENU_MAIN, CHANNEL); }
listen(integer channel, string name, key id, string message) { if (llListFindList(MENU_MAIN + MENU_OPTIONS, [message]) != -1) { llSay(0, name + " picked the option '" + message + "'."); if (message == "Hi" | message == "Bye") { llDialog(id, "Which Language!", MENU_OPTIONS, CHANNEL); message2 = message; } else if (message == "Finished") { } else { if(message2 == "Hi") { if(message == "English") { llSay(0, "Hello"); llDialog(id, "What Do you want to say?", MENU_MAIN, CHANNEL); } else { llSay(0, "Hola"); llDialog(id, "What Do you want to say?", MENU_MAIN, CHANNEL); } } else { if(message == "English") { llSay(0, "Goodbye"); llDialog(id, "What Do you want to say?", MENU_MAIN, CHANNEL); } else { llSay(0, "Hasta luego"); llDialog(id, "What Do you want to say?", MENU_MAIN, CHANNEL); }
} message2 = ""; } } } }
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
02-26-2008 03:46
The sometimes unintuitive thing to realise about llDialog is that the resultant dialog is not bound to the script that launches it. The blue menu that appears is wholly separate from any script.
Clicked buttons say their 'word' on behalf of the clicking agent on the channel assigned to the dialog. Any script with the appropriate listen can respond to that button click.
For this reason, before using llDialog, you need to make sure you have a good strategy for picking the channel to be used by the dialog. Cross-talk (scripts over hearing commands not meant for them) can become a problem.
|
|
John Coakes
Registered User
Join date: 30 Mar 2007
Posts: 4
|
02-26-2008 03:52
NO U MISSING THE POINT PEOPLE
I need 3 dialog menu with submenu's
but controlled by 1
So 1 menu opens 3 dialogmenu with submenu's
|
|
Alicia Sautereau
if (!social) hide;
Join date: 20 Feb 2007
Posts: 3,125
|
02-26-2008 04:51
thanks to void`s dialog entry count  list klParseButtons( integer vIntPage ) { list vLstReturn; integer vIntLength = llGetListLength( klButtons ); integer vIntStart = llAbs(vIntPage) * 11;
if (vIntLength - vIntStart > 0) { if (vIntLength - vIntStart > 12) { vLstReturn += llList2List( klButtons, vIntStart + 9, vIntStart + 10 ); if (vIntPage < 10) { vLstReturn += ["MORE (0" + (string)(vIntPage + 1) + ")"]; } else { vLstReturn += ["MORE (" + (string)(vIntPage + 1) + ")"]; } vLstReturn += llList2List( klButtons, vIntStart + 6, vIntStart + 8 ); vLstReturn += llList2List( klButtons, vIntStart + 3, vIntStart + 5 ); vLstReturn += llList2List( klButtons, vIntStart, vIntStart + 2 ); } else { integer i = vIntLength - 1; for (i; i - 2 >= vIntStart; i -= 3) { vLstReturn += llList2List( klButtons, i -2, i ); } if (i >= vIntStart) { vLstReturn += llList2List( klButtons, vIntStart, i ); } } } return vLstReturn; } //////////////// END Functions \\\\\\\\\\\\\\\\
list klButtons;
//////////////// END Variables \\\\\\\\\\\\\\\\
string dialog(string a) { status(""); if (a == "Main") { kl_state = ""; klButtons = (klButtons = []) + ["1", 2]; if (admin == creator) { klButtons = (klButtons = []) + klButtons + ["3"]; } if (ONLINE) { klButtons = (klButtons = []) + klButtons + ["4"]; klButtons = (klButtons = []) + klButtons + ["5"]; } klButtons = (klButtons = []) + klButtons + ["6"]; } if (a == "Network") { kl_state = "Network"; klButtons += (klButtons = []) + klButtons + ["11"]; klButtons += (klButtons = []) + klButtons + ["21"]; } llDialog(admin , "Setup", klParseButtons(0), dChannel);
a = ""; return a; }
//////////////// END Dialogs \\\\\\\\\\\\\\\\
default { on_rez(integer startparam) { llResetScript(); }
state_entry() { // this is what your looking for dialog("Setup") dialog("somethingElse") dialog("AbCd") } }
this isn`t exactly something for release as i just stripped it out of my code pre defining the buttons in the dialog function and use to call what ever dialog (or in your case multiple at a time) with: dialog("Name"  most likely not the most efficient way but works for nubby self pretty well and possible give you an idea while others are in bed to post something better 
|
|
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
|
02-26-2008 07:35
From: John Coakes NO U MISSING THE POINT PEOPLE It looks to me like everyone is telling you exactly what you asked for. Just to be clear, you want to script one main dialog menu which has 3 options: (1)(2)(3) And when of of those options is clicked, another dialog menu is displayed which corresponds to that selection. Is that not an accurate description of what you want?
|
|
Alicia Sautereau
if (!social) hide;
Join date: 20 Feb 2007
Posts: 3,125
|
02-26-2008 07:46
From: Deanna Trollop It looks to me like everyone is telling you exactly what you asked for. Just to be clear, you want to script one main dialog menu which has 3 options:
(1)(2)(3)
And when of of those options is clicked, another dialog menu is displayed which corresponds to that selection. Is that not an accurate description of what you want? no, he wants when you press the first dialog button to open 3 dialogs at the same time main: colors opens: color_main dialog color_bla dialog color_blind dialog only thing is that the 2 would be hidden behind the first dialog, not 3 buttons or folow ups but 3 dialogs at a time 
|
|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
02-26-2008 09:01
I was assuming we were after the 'sub menus' each being controlled by a separate script. Although I am worried that John is getting bogged down in second-guessing a solution rather than being clear about what it is he is trying to achieve. But I'm sure if the OP shouts loud enough, and does some arm waving, we're all sure to get the idea eventually. 
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
02-26-2008 09:14
@original question: yes, it is possible and it's been done... alot.
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
John Coakes
Registered User
Join date: 30 Mar 2007
Posts: 4
|
02-26-2008 22:19
From: Alicia Sautereau no, he wants when you press the first dialog button to open 3 dialogs at the same time
Close lol but not at same time.. I try to explain better If for example u have a dialog menu with 1 button, and u click that, max buttons u can have is 1 on first level and 12 on second level of dialog so on a 1 dialog script options are limited to say 12 x 12 max 12 pages with 12 buttons (144 options) What i whant to achieve is this: 1 dialog script with 1 page with say as example 3 buttons that dialog has to close on choice and activate a new 144 button dialog menu so u break the limit of 144 and triples it hope u understand now what i mean....
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
02-26-2008 22:28
There's no magical limit of 144. You can have navigation buttons (e.g. "previous" and "next"  that essentially make the number of choices limitless. You're thinking of the dialogs as purely hierarchical in nature, which doesn't have to be the case. For that matter, you could increase the depth of a tree heirarchy to 3 rather than 2 and have up to 12^3 possible end choices (maybe this is what you are trying to express). The possibilities are limitless, really. As long as you can figure out how to distinguish by dialog channel or button content or timing or whatever, you can have any number of dialogs.
|