These forums are CLOSED. Please visit the new forums HERE
removing scripts from child prims |
|
|
Siddean Munro
Artist!
Join date: 21 Apr 2007
Posts: 113
|
01-06-2009 20:03
I have a couple of hundred prims with no mod scripts in them and I wish to delete them. I have other items in the prims and I just need to remove the scripts in order to replace them with updated scripts. I have searched and searched, but I can't seem to find out if it's possible to link these prims together and run a script on them that deletes all the scripts from the child prims. Does anyone have any suggestions? Or am I going to have to do it by hand?
_____________________
My Second Life Blog. New releases, fashion news and musings and more- http://slink.mmoportraits.com/
|
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
01-06-2009 20:21
this might work
string delete = " ";///put in the name of the script you need to delete string myname; default { state_entry() { myname = llGetScriptName(); if(llGetLinkNumber() == LINK_ROOT)//i've been using LINK_ROOT as opposed to 1, because i got finnicky results in the past when i used 1 { integer i; for(i = llGetNumberOfPrims(); i > 0; i--) { llGiveInventory(llGetLinkKey(i),myname); } } if(llGetInventoryType(delete) != -1) { llRemoveInventory(delete); } llRemoveInventory(myname); } } you'll need to take the object into inventory, re-rezz it and then set scripts to running in the tools menu _____________________
Dark Heart Emporium
http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020 want more layers for tattoos, specifically for the head? vote here http://jira.secondlife.com/browse/VWR-1449? llDetectedCollision* Functions similar to touch http://jira.secondlife.com/browse/SVC-3369 |
|
Siddean Munro
Artist!
Join date: 21 Apr 2007
Posts: 113
|
01-06-2009 21:38
Thank you Ruthven, I will give it a try!
_____________________
My Second Life Blog. New releases, fashion news and musings and more- http://slink.mmoportraits.com/
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-06-2009 22:41
You could even delete all scripts in the prim inventory for which you don't have copy permissions using logic like the above plus the llGetInventoryPermMask() function. See:
http://www.lslwiki.net/lslwiki/wakka.php?wakka=llGetInventoryPermMask http://www.lslwiki.net/lslwiki/wakka.php?wakka=llGetInventoryNumber http://www.lslwiki.net/lslwiki/wakka.php?wakka=llGetInventoryName |