Hi there.. How to drop a script to all linked prims? I want to put a script on main prim and this same script be dropped to all linked.
many thanks
These forums are CLOSED. Please visit the new forums HERE
drop a script to all linked prims |
|
|
Gutao Rosca
Registered User
Join date: 17 Feb 2007
Posts: 1
|
01-10-2008 04:20
Hi there.. How to drop a script to all linked prims? I want to put a script on main prim and this same script be dropped to all linked.
many thanks |
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
01-10-2008 04:26
You can use llGiveInventory from a script to give itself, or another script, to every prim in the object, using llGetLinkKey to get the key of each prim.
They won't be running once you've done that, but if you then take the whole object back into inventory, then rez it, select it and "Set Scripts To Running In Selection", they will be. There's an example of a script which uses it to check inventory permissions for all prims in a linkset here: http://ordinalmalaprop.com/forum/discussion/24/example-automatic-inventory-permissions-checker/ _____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!
http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names |
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-10-2008 08:56
You can also use llRemoteLoadScriptPin(), but only if the PIN has already been set for the prims. That makes it a little less convenient, but it can still be useful if you want to update a script often in all prims of an object or all attachments of a prim avatar, for example.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
01-10-2008 14:54
small warning, llRemoteLoadScriptPin suffers in the one aspect that each prim in the linkset that you intend to give a script to must have already set a script pin, so it's no good for giving scripts to a prim not already initialized... if you need to do that you'll need to use ordinals method. I've used something similar to pass a link message testing rig throughout a build.
_____________________
|
| . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - |