|
Eli Schlegal
Registered User
Join date: 20 Nov 2007
Posts: 2,387
|
05-18-2009 17:28
Hi I'm having trouble with my AO because it does not work on parcels where scripts are disabled. From what i have read it is because the scripts in it do not take controls. The AO itself is mod, but there are two scripts inside it that are no-mod. I'm wondering if I could add a third script that will make it take controls? Any help would be appreciated.
|
|
Viktoria Dovgal
…
Join date: 29 Jul 2007
Posts: 3,593
|
05-18-2009 18:03
Yeah, you can do it that way. It's a little ugly to add a script just for that, but if you like the object otherwise, I guess it does the job in a no mod world. This needs to go in the same prim as the scripts that are getting shut down. default { state_entry(){ if (llGetAttached()) { llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS); } }
attach(key id) { if (id) { llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS); } }
run_time_permissions (integer perm) { if (perm & PERMISSION_TAKE_CONTROLS) { // Take all the same controls ALL the scripts in the same // object want to use, or SVC-3187 will break them. // If none of the other scripts in the object take controls, // you don't need to worry about that (and if they do, you // probably don't need this little script in the first place). llTakeControls(CONTROL_FWD, FALSE, TRUE); } } }
You'll want to know that some commercial items are written in a rather paranoid way, and will go so far as to stop or even delete foreign scripts, so if you run into trouble see if the running box is getting unchecked.
|
|
Eli Schlegal
Registered User
Join date: 20 Nov 2007
Posts: 2,387
|
05-19-2009 03:56
Thanks so much Viktoria. I will try it tonight when I get home... on a copy first, just in case anything goes wrong. Really appreciate your help.
|