Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Dialogue nesting problem

Icarus DuCasse
Registered User
Join date: 28 Jan 2007
Posts: 27
02-08-2007 23:46
Im rather new to sl, however I managed to get this far. My Dialogue button to call another dialog menu doesn't work for some odd reason. Can't figure it out.
Consideration is appreciated :)

/quote
...
llListen( 4913, "", NULL_KEY, "";);
...
touch_start(integer total_number)
{
llDialog(llDetectedKey( 0 ), "Options", ["Goodwill"], 4913);

}
listen(integer channel, string name, key id, string choice )
{
if(llListFindList( menu, [ choice ]) != -1 )
{
if ( choice == "Lights" )

{
llWhisper(0,"Goodwill ";);
llDialog(llDetectedKey(0), "Goodwill", ["no thanks", "please do"], 4913);

}
/quote

The script gets to goodwill, the following llDialog function is ignored.

Thanks!
Icarus DuCasse
Registered User
Join date: 28 Jan 2007
Posts: 27
02-08-2007 23:49
*
if ( choice == "Goodwill" )
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
02-09-2007 00:13
this doesnt make much since

llDialog(llDetectedKey( 0 ), "Options", ["Goodwill"], 4913);

sends a dialog with the window text reading options and a button labled "Goodwill"

CODE

listen(integer channel, string name, key id, string choice )
if(llListFindList( menu, [ choice ]) != -1 )
{
if ( choice == "Lights" )

{
llWhisper(0,"Goodwill ");
llDialog(llDetectedKey(0), "Goodwill", ["no thanks", "please do"], 4913);

this wouldnt comple anyways

CODE

listen(integer channel, string name, key id, string choice )
{
if(llListFindList( menu, [ choice ]) != -1 )
{
if ( choice == "Lights" )
{
llWhisper(0,"Goodwill ");
llDialog(id, "Goodwill", ["no thanks", "please do"], 4913);
}
}
}


this would compile but your first checking to see if the input is on a list which isnt neccacary, then your not testing for exact phrase "Goodwill", your testing for the string "Lights", so whisper and dialog would never fire under these conditions

and the main question is in llDialog you dont use llDetectedKey anymore, llDetectedKey only works with physical interaction, when chat is received the uuid of that av is returned as key id, just as string choice would for your options
Icarus DuCasse
Registered User
Join date: 28 Jan 2007
Posts: 27
02-09-2007 00:20
ok,thx.
using llmessagelinked and loading a dialogbox fom another prim works also.

Cheers,