Jump to content

Setting default attach point with script?


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

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

Recommended Posts

Is it possible to set the default attach point of a linkset via a script? Digging through LLSLPP, I don't see anything. I want the user to be able to drop a script into a basic cube, and the attach point get set to one of the HUD positions.

If I weren't starting out with a raw prim, I'd just wear it to set it, but can't do that in this case. I don't want the script to attach the linkset to the user during the configure process.

Link to comment
Share on other sites

12 hours ago, Phate Shepherd said:

I don't want the script to attach the linkset to the user during the configure process.

As far as I know, the only way to set the default attach point is to actually attach to an avatar. Closest thing would be to llAttachToAvatar (NOT the temp version, which would destroy the object) then llDetachFromAvatar immediately after attached in the attach() event. Unfortunately it is also impossible to 'drop' (detach, then rez self on ground) an object via script.

<technical meandering> It's probable that 'default attach point' is a property of inventory assets, and not the actual objects themselves, which would mean setting it without it being attached would be basically impossible to implement. </technical meandering>

  • Like 3
Link to comment
Share on other sites

Quite honestly I don't want a script (or creator) deciding where an object should attach. I find annoying enough that a couple of my HUDS want to revert to a "default" position every time I attach them rather than respecting the location I have moved them to before detach*. I know that's not the scope of the OPs question, but if we had that ability to set attach-points via script I just know in my bones that there's be creators out that would use that power a less than elegant or polite way.

 

==

(*tangent: when make HUDS I'll detect if the HUD point has changed from the last time it was worn and if so will reset the location to a neutral default for that new point since it's going move move around anyway and I don't want it potentially getting lost off the edge of the screen, but after that I don't touch the local position.)

  • Like 1
Link to comment
Share on other sites

You might want to look at the scripting request at https://feedback.secondlife.com/scripting-features/p/llsetlinkattachmentpoint , which comes close to what you're asking for -- although I would personally ask for llSetAttachmentPoint, as one of the commenters has already suggested.. There are quite a few comments on it already, but another few wouldn't hurt.  You'll notice that Spidey Linden has already marked it as Tracked, which means that it is under consideration but not yet accepted for action. Moving it to Planned or In Progress is partly a matter of how much traction the idea has with the scripting community.

  • Like 1
Link to comment
Share on other sites

49 minutes ago, Anna Salyx said:

Quite honestly I don't want a script (or creator) deciding where an object should attach. I find annoying enough that a couple of my HUDS want to revert to a "default" position every time I attach them rather than respecting the location I have moved them to before detach*. I know that's not the scope of the OPs question, but if we had that ability to set attach-points via script I just know in my bones that there's be creators out that would use that power a less than elegant or polite way.

 

==

(*tangent: when make HUDS I'll detect if the HUD point has changed from the last time it was worn and if so will reset the location to a neutral default for that new point since it's going move move around anyway and I don't want it potentially getting lost off the edge of the screen, but after that I don't touch the local position.

I don't want to force a specific location for the HUD, I just wanted the default not to be the hand. This is in a builders tool where I am trying to automate as much as possible.

As for your tangent, that is exactly what I did in my pose tool. It only defaults the position if it detects you have picked a new attachment point. otherwise it leaves position and scale alone.

Link to comment
Share on other sites

17 minutes ago, Phate Shepherd said:

I don't want to force a specific location for the HUD, I just wanted the default not to be the hand. This is in a builders tool where I am trying to automate as much as possible.

No, I got that, but if we had that power at the script level there would be some who might.  I put specific rigged mesh item on a wingtip just to have it out of the way.  I don't want some creator to reset that each time I take it off to where they think it belongs:  I don't want to have to specify each time wear it, where I want it to go.  Would it be used this way? I'd like to think not, but I'm not a stranger to the quirks of creators.  :P  I do understand what you're trying to do, and why, and I empathize, automation is a passion of mine.  But somethings aught not be touched. IMO at least. :)

  • Like 1
Link to comment
Share on other sites

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