Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llRemoteLoadScriptPin flaws

Delerium Hannibal
Registered User
Join date: 30 Apr 2004
Posts: 28
08-03-2006 20:47
I'm starting to notice that llRemoteLoadScriptPin works on a per PRIM basis unlike what the wiki says OBJECT basis. What I'm trying to accomplish is to drop one script into a linked object and have it copy itself to all the children prims and run itself. The script itself does a llSetRemoteScriptAccessPin, so the object itself has an access pin number. When it tries to copy itself to the children prims, I get this "Task ScriptObject trying to illegally load script onto task Object!"

Is there any way to populate a linked object with running scripts? This is making me tear my hair out here. It's a hard problem to describe so if you have questions please post and I'll try and clarify.
Norman Desmoulins
Grand Poohba
Join date: 10 Nov 2005
Posts: 194
08-03-2006 21:46
You have to set the access pin for each prim in the object, and upload the script to each prim. Yes, would be lovely to only have to set the access pin on the root object.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
08-04-2006 00:05
I just wrote a couple of scripts to do this, actually (one that goes on an object who's sole purpose is to distribute a script for updating all the prims of another object, and one on each prim to receive the script; once each of the prims is set up, you shouldn't have to touch them again). I can't copy/paste from SL because I'm on Linux, and I'm not going to retype the whole thing. If you'd like a copy, IM me in SL.
Delerium Hannibal
Registered User
Join date: 30 Apr 2004
Posts: 28
08-04-2006 01:25
yeah, I can do that so far.... I guess I just wanted my life to be a little easier... My script is very contraversial (mirroring objects) but the application I'm using it for is purely legit. Basically I've started building suits of armor and such. full prim suits. I have a script that I made/modified from scripts I found off the forums which basically works like this:

I put up a mirror prim on my pose stand. Then I put in a script into a prim that I own. That script renames the prim to "mirrorme". The mirror detects this name, injects a scripted prim and a script. The script rezzes the prim, copies the parent it's in, then mirrors it across to the other side of the pose stand. Then it cleans itself all up, deleting all the scripts out of the prims. This all works on a per prim basis, I was just being lazy (and actually curious to see if I could script it) and trying to get this to work on a per object basis and not just a per prim basis. The secondary script I have now basically tries to inject itself into all the prims in an object, then de-links itself and does all the mirroring, then relinks itself back in teh order it was in. Thats basically the dirty details, and I can't figure out a way to do it without throwing a script into each prim anyway, so I guess thats where I stand.
Norman Desmoulins
Grand Poohba
Join date: 10 Nov 2005
Posts: 194
08-05-2006 08:59
I think that is prolly one of the reasons that they made it a little difficult for us.

I wrote a script that can copy an entire object---straight or mirrored on any axis. Can copy anything that is mod, but you do have to first set an access pin for every object.

There are ethical reasons for such a script... such as taking something that you did in preview and remaking it in main grid, having a backup of an object on your own hard drive, or transferring something that you made with an alt to your main av.
Delerium Hannibal
Registered User
Join date: 30 Apr 2004
Posts: 28
08-05-2006 19:43
not only that, the reason I stated, I like the mirror function purely. I don't care about copying other people's objects, but when I want to make any sort of attachment that goes on both sides of the body, it's nice to be able to just mirror the prims across rather than try and rebuild it and rotate it manually. SL is a very open minded system. There are TONS of unethical things you can do with the tools provided. to put this kind of restriction simply based on ethics is like the pot calling the kettle black. besides, the only thing you can really get from copying someone elses object is the prim itself. no textures, no scripts... I can see the use, and abuse of such though. I just don't see the reason to allow some unethical methods, but restrict others.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
08-05-2006 20:00
Wiki is wrong in this regaurd, the attribute is per prim. On much of the wiki prim & object are used interchangably which is technicaly inaccurate. Only Status attributes (and owner, group & asset permissions) are per-object; all others are per-prim.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
08-06-2006 13:36
If you are just using it on objects you yourself own, then you can simply make a second script that distributes the mirror script to the other parts of the object via llGiveInventory. Once it's finished, delete the distribution script and do a Set Scripts to Running in Object from the Tools menu on the object.
Norman Desmoulins
Grand Poohba
Join date: 10 Nov 2005
Posts: 194
08-06-2006 21:41
Hum... going off that, you can try the following script dropped into your root object to set the access pin for all prims in the object.

CODE

default
{
state_entry()
{
llSetRemoteScriptAccessPin(99);
integer num = llGetLinkNumber();
if (num==1)
{
integer count = llGetNumberOfPrims();
integer i;
llOwnerSay("giving access script to "+(string)count+" objects");
for (i = 2; i <= count; i++)
llGiveInventory(llGetLinkKey(i), llGetScriptName());
llOwnerSay("give complete... Set Scripts to Running in this object now");
}
else if (num==0)
{
llOwnerSay("this is a single prim");
}
else
{
// a little something to show that we ran
llOwnerSay((string)llGetLinkNumber()+" : "+llGetObjectName()+" - "+(string)llGetKey());
}
llRemoveInventory(llGetScriptName());
}
}
Delerium Hannibal
Registered User
Join date: 30 Apr 2004
Posts: 28
08-07-2006 18:55
oh man. I didn't even think of that. It's an extra step but it's by far less work than manually doing it. thanks very much!