Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

HUDs - detecting clickable positions / prims??

BritHawk McMillan
Registered User
Join date: 26 May 2008
Posts: 23
03-13-2009 12:21
I'm sure this is possible although I've not had any success finding out yet.
I want to create a HUD with say 6 linked prims in which I could click individually to access them for 6 various options.
While I can detect the fact I've clicked on the HUD I cannot work out how to determine which prim was touched.
Also even if I rezzed one massive prim I cannot determine which area of the prim I have clicked on either.
I'm sure this can be done because I have the Simbolic Translator and that has it's own customised pull down menu for users to select languages.
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
03-13-2009 12:38
Take a look at and closely related pages.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-13-2009 16:15
if the child prims represent your touchable buttons llDetectedLinkNumber should solve your problem
_____________________
|
| . "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...
| -
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
03-13-2009 21:58
This is the easiest way I've seen to do what you're looking for...


CODE

integer hudchan = 0; // for testing purposes

default
{
touch_start(integer num)
{
llSay(hudchan, llGetLinkName(llDetectedLinkNumber(0)));
}
}


Create a base , then create your six (or however many) buttons you want and name them button 1, button 2, etc... and drop that script in the base prim. Link them together selecting the base piece last, and you're all set.
_____________________
My tutes
http://www.youtube.com/johanlaurasia