Jump to content

Generating a HUD from an object


LissomePrey
 Share

You are about to reply to a thread that has been inactive for 3577 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I want an object to be able to supply a HUD to the wearer but it rezzes it ( built as a very thin basic box) as an object rather than as a HUD. Can anyone suggest what I am doing wrong please?

Rez instruction is:

 llRezObject(llGetInventoryName(INVENTORY_OBJECT,0),llGetPos() + <0, 0, 0>, ZERO_VECTOR, ZERO_ROTATION, 0);

I am sure this must be a very basic question but I can't find an answer via search or Google. Any help appreciated.

Link to comment
Share on other sites

Thanks for the quick reply I'm obviously misunderstanding something that is probably obvious.

llAttachTo Avatar seems to attach theobject in which the script exists. I want an object being worn already to rez a HUD.

llAttachToAvatar needs to go in the HUD script as far as I can see but the HUD is being rezzed as a visible object.

Link to comment
Share on other sites

A HUD is an object.  It just happens to be an object that you wear.  It sounds as if you have the rezzing part down pat. Now all you need is the wearing part.  That's a little tricky, because you can't wear something that you do not own, and whoever used your rezzer does not yet own the new HUD. I think I'd try doing two things, disguised as a single step.

1. Have your rezzer not only rez a new HUD but also give a copy to the user with llGiveInventory.  That will put a permanent copy into the person's inventory for later use.

2. Rez a HUD and immediately ask the user for permission to attach it with llAttachToAvatarTemp. When the user gives permission, go ahead and attach it as a HUD.  That HUD should function as designed but will vanish when the user detaches it, since it was only attached temporarily.  When the user wants to wear it again, s/he will be attaching the first copy from inventory.

From the user's perspective, this does involve two clicks -- one to rez and another to give permission to attach -- but it's a little easier than rezzing the HUD and then finding it in inventory and wearing it.

 EDIT:  I typed this while you were receiving and responding to other comments.  My idea will still work.  Just use llAttachToAvatar instead of AttachToAvatarTemp.

Link to comment
Share on other sites

Thanks for all the help so far. I think I am nearly there.

I can give a HUD via the menu from the base object, with llGiveInventory. The HUD attaches itself correctly when added.

I'm still trying to get a step in-between so that the given HUD asks for permission to attach itself automatically. Any suggestions or pointers to tutorial please?

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3577 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...