Jump to content

LSL script function suggestion


Reynard Baroque
 Share

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

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

Recommended Posts

Not sure where this should properly go, as last time I had a suggest it went into the JIRA. However, here goes...


I would like to see a command that lets a script running in an object attach another object directly to the avatar without having to rezz it in-world. Essentially, I'm looking to combine the functionality of llRezObject(...) followed by that object executing an llAttachToAvatar(...) as part of it's script start-up.


What I'm striving for here is a HUD that rezzes and controls a lightsaber prop. The idea is that the user will receive just a HUD; the HUD will contain the lightsaber. If there was a means to attach the prop directly from the HUD contents to the HUD wearer's attach points, it would allow them to attach and use the lightsaber even in no-rezz areas, and would also mean the wearer wouldn't have to attach anything except the HUD.

Proposed syntax:

llAttachObjectFromContents( string name, vector position, rotation rot, integer attach_point, integer param )

name would be the name of the item to rez and would of necessity be limited to INVENTORY_OBJECT types; if a non-object item in the contents was specified, or the object was missing, the script should chat an error on the DEBUG channel. It should specifically NOT permit the use of UUIDs to rezz the object as there would possibly be copy permission conflicts.

position would be the offset from attach_point.

rot would be the rotation relative to attach_point in quaternion form.

param woud be any parameter desired to pass to the object's on_rez event when it rezzes and attaches, same as in llRezObject().

The command should only be valid to attach objects to the avatar wearing the object containing the script; not to any other avatar, and should require PERMISSION_ATTACH via llRequest Permissions().

Thoughts? Objections?

Link to comment
Share on other sites

Not a bad idea.  The standard way to beat that problem, as you probably know, is to attach the light saber and then make it transparent when you want it to appear detached.  If you normally have an animation triggered when the saber is attached, simply stop the anim when it goes transparent.

That said, no .... this is not the place to post the suggestion:

1. This is a library.  People come here to post finished scripts for general use, or to look for those finished scripts

2. This is not an appropriate place for a discussion .

3.  Lindens never come here, certainly not to look for ideas for new LSL functions.  To submit a suggestion like this, go to the JIRA.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3964 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...