Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Touch Menus

Dale Harmison
Registered User
Join date: 26 Dec 2005
Posts: 59
06-28-2006 10:01
Hi all
I was just wondering if you guys could help me with learning more about how the touch ingame menus work.
I'm still new to scripting and any info would be much apriciated.
Thank you very much all!
Jade Bard
Registered User
Join date: 7 Jul 2004
Posts: 106
06-28-2006 10:10
Are you talking about HUD's or are you talking about dialog boxes?

Dialog boxes are the blue things that pop down on the upper right corner of your screen.
_____________________

Dale Harmison
Registered User
Join date: 26 Dec 2005
Posts: 59
06-28-2006 10:17
From: Jade Bard
Are you talking about HUD's or are you talking about dialog boxes?

Dialog boxes are the blue things that pop down on the upper right corner of your screen.


o im very sorry for leaving that out, i was askin about the dialog box ones.
Angela Salome
Registered User
Join date: 6 Oct 2005
Posts: 224
06-29-2006 01:46
From: Dale Harmison
...i was askin about the dialog box ones.


Look up llDialog on the wiki.
Heuvadoches Naumova
Equus Exoticus
Join date: 6 Oct 2005
Posts: 174
06-29-2006 05:32
I have....and it reads like Greek. How about a breakdown, with example code? Possibly an open source wrapper?
_____________________
Respectfully yours,
Heuvadoches
[I try to be in character as much as possible.]


[left]Obligitory Advertisement: Pixel Crack Productions - Rainbow Tiger Island Mall
[/left]
Harris Hare
Second Life Resident
Join date: 5 Nov 2004
Posts: 301
06-29-2006 09:59
Here's a very basic example.
When you touch the object, it will present the person who touched it with a dialog and a button that says "YOWZA".

CODE

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

touch_start(integer total_number)
{
string message = "Hey you! Click the YOWZA button.";
list buttons = ["YOWZA"];
llDialog(llDetectedKey(0), message, buttons, 12345);
}

listen(integer channel, string name, key id, string message)
{
if (message == "YOWZA") {
llSay(0, "Hi " + name + ". I heard you say YOWZA!");
}
}
}


Basically, a when a user clicks a dialog button, it forces the user to "speak" what the buttons says. So all you have to do is listen on a hidden channel ("12345" in this example) for the text on the button then act on it.
Dale Harmison
Registered User
Join date: 26 Dec 2005
Posts: 59
07-01-2006 07:29
yup that worked, is there a place somewhere online or in the forums where i could read more on the menues and how to add more features and options to them?
thank you!
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
07-01-2006 13:00
Try http://secondlife.com/badgeo/wakka.php?wakka=llDialog

The wiki is the central repository of all such things.
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog