|
Alexandria Ellison
Registered User
Join date: 21 Sep 2006
Posts: 4
|
07-17-2007 05:32
I am wondering if it is possible to add items to prims in a linked set without having to edit each link and drop the item in... be it script, object, notecard, texture or what not. Is this possible?
I would like to know if there is a script function to put items from the main prim into the inventory of linked ones.
For example, I created a 200 prim hair style and wanted to add a script in each prim to retexture the hairs into 20 different colors. Some of the prims in the linked set have alpha textures, some have the actual hair texture and others have different properties etc... it would save me so much time if I could add a script to each prim to assist me with retexturing all for every color of hair I want.
Other example is mass distribute notecards with settings to different link sets without having to edit every link to give inventory.
Help is much appreciated.
|
|
Milambus Oh
Registered User
Join date: 6 Apr 2007
Posts: 224
|
07-17-2007 06:08
Please.. please do not make your hair work that way. Or at least if you do, bring it no where near me. 200 scripts sitting around bogging down the sim resources isnt really the best way to handle things... though sometimes it is the only way to do it. But to answer your question: llGiveInventory http://lslwiki.net/lslwiki/wakka.php?wakka=llGiveInventoryCycle through all the child nodes, getting thier UUID and then use llGiveInventory.
|
|
Alexandria Ellison
Registered User
Join date: 21 Sep 2006
Posts: 4
|
07-17-2007 08:37
I had plans to texture it that way but not actually leave the scripts in it. I'd initiate a command to texture it one color, copy it, till I had the 20 different styles I want then another command to remove all scripts from prims etc to clean up the mess.
Does that make sense? I'm just trying to cut down on the labor it woulud take to edit 200 some prims to apply textures, then go to the next color. Imagine 200 prims X 20 different hair textures.... Thats a lot of prims to edit.
Thanks though, I'll look into llGiveInventory, I thought all that did was give inventory to players, not prims? And wouldn't there be a quick way to llGiveInventory to all the prims or do I need their link number etc?
Thanks for the help, its much appreciated.
|
|
Alexandria Ellison
Registered User
Join date: 21 Sep 2006
Posts: 4
|
07-17-2007 08:44
Reading through,
Q: Can all prims in a linked object be given inventory items? A: No, though they can each give inventory.
Looks like what I am trying to do is not possible? Sigh. Guess Ill have to create my hair with scripts already in the building prims... that seems to be the only way to go.
Or am I misunderstanding?
Thanks
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
07-17-2007 09:06
I must be missing something: How about llSetLinkTexture() and llSetLinkColor(), cycling through all the prims in the linkset? Or, if doing both at the same time, maybe llSetLinkPrimitiveParams()? If it's too slow, dispatch to a few slave scripts with llMessageLinked(). But at least all the scripts would be in the root prim, and could be easily removed or set not-running when they've done their thing.
[Edit--if I re-read the OP correctly, there are different classes of prims that are to be textured or colored differently--or something like that. In that case, the link coloring or texture might be made conditional on llGetLinkName(), where the prim's name codes how it is to be textured. Or colored. Or whatever is going on here.]
|
|
Milambus Oh
Registered User
Join date: 6 Apr 2007
Posts: 224
|
07-17-2007 09:56
From: Alexandria Ellison I had plans to texture it that way but not actually leave the scripts in it. I'd initiate a command to texture it one color, copy it, till I had the 20 different styles I want then another command to remove all scripts from prims etc to clean up the mess. Sorry, I guess I misunderstood what your plans where. I was thinking that you planned to sell the hair with the scripts still in it, allowing the customer to alter the textures when then wanted.
|
|
Alexandria Ellison
Registered User
Join date: 21 Sep 2006
Posts: 4
|
07-17-2007 15:09
Also those were just examples, what this comes down to is... is it possible to distribute objects, scripts, notecards or things of that nature among prims in a linked object? This would help me so much in certain situations and I'm trying to learn if it is possible.
My vision was to drop a script and objects/notecards/otherscripts in the root prim and have them all copied to the other linked prims... is my vision flawed since this might not be possible? Or could it be done differently?
Thanks.
|
|
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
|
07-17-2007 15:35
llSetLinkTexture(LINK_SET, ...)? Doesn't work? (I've not tried it btw)
_____________________
http://slurl.com/secondlife/Together
|