Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llAttachToHUD()?

Darok Kaminski
Registered User
Join date: 17 Feb 2007
Posts: 11
05-16-2007 03:12
It would be nice if LL implements a function like this:
-----------------------------------------------------------------
llAttachToHUD(integer hud_position, string object_name)

Only works if the scripted object it's attached to HUD. Attaches an object with name "object name" that it's in the scripted object's inventory to the "hud_position". No attachment permission required because you've granted to the scripted object. "hud_position" must be diferent of scripted object's hud position because only one object can be attached in on position.
-----------------------------------------------------------------
That function could make to create and destroy (llDie()) dinamically objects at HUD without rez in world (instead llRezObject() &s llAttachToAvatar()). It will be a nice function to develop good HUD-interfaces that dinamically can open and close "windows".

What do you think about this?
;)
_____________________
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
05-16-2007 04:59
Why prevent it from attaching an object to the location the script is in?

What would be the harm in allowing a HUD object to replace itself?
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Darok Kaminski
Registered User
Join date: 17 Feb 2007
Posts: 11
05-16-2007 05:50
From: SuezanneC Baskerville
Why prevent it from attaching an object to the location the script is in?

What would be the harm in allowing a HUD object to replace itself?

I though it was a bit dangerous, but maybe it's a good idea to allow it :)
_____________________
Draco18s Majestic
Registered User
Join date: 19 Sep 2005
Posts: 2,744
05-16-2007 07:41
How about allowing an attachment to any location?
We do have llAttach() but it only works for rezed objects. I can't wear a HUD and when I click it have it attach my flight booster (which I don't like wearing all the time due to its remarkable ability to make me constantly float UP instead of hovering) because the attachment is in the HUD's inventory.
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
05-16-2007 10:07
Draco, the Flying Tako sailboat attaches huds with a voice command. It's an open source script.

You sit on the boat, and after that it'll respond to a voice command to attach its HUDs. The only downside is that each time you do this you get another copy of the HUD in your inventory, but frankly it's so convenient it's great.

Let me know if you need help finding it. Sounds like it accomplishes what you want to do.
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
05-17-2007 07:23
You can find the source for the Flying Tako HERE. Unfortunately, this version of the code doesn't seem to auto-attach the HUD.
Draco18s Majestic
Registered User
Join date: 19 Sep 2005
Posts: 2,744
05-17-2007 07:36
Um, I'm sorry, but in the entire contents of those scripts not one place does it attach a HUD. In fact, as far as I can tell the HUD is actually prims on the boat itself placed such that they look like a HUD when the camera position is moved when the avatar sits on the boat.
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
05-17-2007 09:33
Read my revised post above, Draco. Evidently the published version doesn't include the HUD, and doesn't include the code to automatically place the HUD.

However, it is a real HUD, not what you were guessing.

I suspect it simply rezzes the HUD from inventory, and the hud attaches itself using llAttachToAvatar().
Draco18s Majestic
Registered User
Join date: 19 Sep 2005
Posts: 2,744
05-17-2007 09:45
Then my point still stands:

From: Draco18s Majestic
We do have llAttach() but it only works for rezed objects.


And I don't even want to try and figure out how I'd rez an object from a HUD inventory to an arbitrary location.