|
Valradica Vanek
Registered User
Join date: 1 Aug 2006
Posts: 78
|
01-08-2007 11:07
I am writing a script such that when a person sits on a sit target, it automatically attaches an HUD from the object inventory. The llAttach2Avatar only has a single variable which is the attachment point. All the examples show attachment from a touched object where the object is identified by touch.
How would one address the HUD in inventory and attach it directly - I can manage the permissions issues, just need to know how to identify and attach the HUD automatically.
An hints would be helpful.
|
|
Keiki Lemieux
I make HUDDLES
Join date: 8 Jul 2005
Posts: 1,490
|
01-08-2007 11:42
My understanding is you would have to give a copy to the Avatar, then they would have to attach it. Unless, the avatar owned the object they were sitting on. Then when they sit on the object, the object could rez the HUD on the ground and the HUD could attach itself from there.
A script cannot interact directly with an avatar's inventory, if that is what you are asking.
_____________________
imakehuddles.com/wordpress/
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
01-08-2007 11:42
Unfortunately, you can't attach things directly from inventory. However, what you can do is have the object rez the HUD, which then tries to attach itself to its owner (it will have to ask permission each time it is rezzed).
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!
http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal
http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
|
|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
01-08-2007 13:24
alternatively, you can have the "HUD" an invisiprim linkset on the object being sat on and use set camera positions to have the HUD appear in the proper place on the screen. it'd take some work, but in the end would most likely be better than any kind of rez and ask permission work around that would be needed for a true HUD attachment.
_____________________
My SLExchange shopTypos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work.
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
01-08-2007 13:31
I'm not quite sure how that would work. Moving camera positions to zoom someone in towards a display would be very inconvenient for them and not be able to compensate for screen size etc.
I have a couple of products which rely on displays being seen in mouselook - but then, they are weapons, and the information is only relevant when the weapon is being used and so the user is in mouselook. And in those cases the object automatically moves to wherever one is looking in mouselook.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!
http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal
http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
|
|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
01-08-2007 13:54
ah
Adressing the initial inquiry: you cannot via script force an object to attach itself to someone from an inventory (object or player). The only way an attachment can occur from inventory to avatar is if the user manually attaches it.
It is also my firm understanding that an avatar can only have objects attached to it that they own, so giving out a HUD to the user puts it directly in their inventory and thus returns to the initial problem: being unable to attach directly from inventory automatically.
There are several Turret guns that get around this by integrating the HUD into the turret itself and locking the camera into a position such that the HUD appears to be attached to your screen. There was also an overhead Robot-wars style arena that took advantage of this as well for the players, locking them into an overhead position with a prim HUD that showed your bot's statistics with a simple llSetText cleverly laid over a textbox texture.
_____________________
My SLExchange shopTypos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work.
|