Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llDialog Scripting

Vixen Deledda
Registered User
Join date: 27 Jan 2006
Posts: 3
01-30-2006 21:43
Well, basicaly im having a problem with the llDialog thing.

i'm trying to make it so when I click on it (owner) it opens up a menu for me (owner) and when someone else clicks it, it just opens up a normal menu for other things.
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
01-31-2006 06:19
touch_start(integer i)
{
key toucher = llDetected_key(0)
if (toucher == llGetOwner()) llDialog(stuff1)
else llDialog(stuff2)
}
Vixen Deledda
Registered User
Join date: 27 Jan 2006
Posts: 3
01-31-2006 15:51
thanks, but can i have that in an example of a script, as in, showing the admin menu and the guest menu please?

Thanks.
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
01-31-2006 15:56
you setup llDialog like usuall, i dont know what your options are would be or otherwise ... the key part is telling the difference between you, the owner, and everyone else which is caputred with the llDetectedKey function and sorted by the if else clause
Vixen Deledda
Registered User
Join date: 27 Jan 2006
Posts: 3
01-31-2006 15:57
Right, okay, well, if your on SL can you give me an IM and ill show you further?
Zodiakos Absolute
With a a dash of lemon.
Join date: 6 Jun 2005
Posts: 282
01-31-2006 16:15
CODE

default
{
state_entry()
{
llListen(600001, "", NULL_KEY, "");
}

touch_start(integer numdetected)
{
if(llDetectedKey(0)==llGetOwner())
{
llDialog(llGetOwner(), "This is the owner's menu.", ["Option 1", "Option 2", "Option 3"], 600001);
}
else
{
llDialog(llDetectedKey(0), "This is everyone else's menu.", ["Option 4", "Option 5", "Option 6"], 600001);
}
}

listen(integer channel, string name, key id, string message)
{
llSay(0, "You've chosen option "+message+".");
}
}


I believe that code will compile as is, and demonstrates how to use llDialog. Kinda. I might have forgotten the order that the listen event takes it's parameters.