Jump to content

Script linking one mesh to another


AkiraKiyoi
 Share

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

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

Recommended Posts

Hello! I create pets and today I thought that it will be great if there is a possibility to create custom clothes for pets. So mb someone can help me... is there posibility to create script that will link one mesh to another? (accesory to pet). I want to sell a mount and different accessories and clothes for it:( Thank you!

Link to comment
Share on other sites

Akira,

The short answer is yes you can. You would need a likely need a couple of scripts, one each in the pet and accessory. The pet script would need to tell the accessory script where it needed to position itself, and the accessory then would need to move itself to said position and then link itself using llCreateLink (http://wiki.secondlife.com/wiki/LlCreateLink ). I imagine you'd want to make it a bit more complete, allowing for the removal of an existing linked accessory, etc..

The fact that it is mesh is irrelevant, in the end they are 'prims' from the point of view of LSL.

 

Wanda

  • Like 1
Link to comment
Share on other sites

It's possible, as already outlined. Note that this only works with modifiable objects (but one hopes anyway that these pets aren't pestilent no-mod breedable vermin). And the owner will need to grant PERMISSION_CHANGE_LINKS. And obviously none of this can work if the pet is attached to an avatar.

You can use llBreakLink to remove the clothing item from the pet.

Because modern linkability rules are so liberal, it's likely the clothing will get rezzed within linking distance of the pet, so probably the moving-into-position can be done after linking, possibly by the pet script -- although the ideal position is presumably a function of the specific pet and the specific clothing item -- and potentially any modifications made to either of them. (Probably easiest if they're all modeled from scratch with the same origin.)

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...
You are about to reply to a thread that has been inactive for 3197 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...