|
Isobel DeSantis
Rechargeable ...
Join date: 1 Jan 2007
Posts: 104
|
12-30-2007 18:04
A friend who is no longer inworld wrote this script to help me texture hidden prim faces. It has one annoying bug, which is that it ALWAYS set the texture on face 0, even if another face is specified in chat, and my scripting knowledge is so limited I can't see where the problem is. I would also like it to be usable by someone who can mod my objects if possible, rather than just restricting it to owner only. Please could someone show me how to modify it? default { state_entry() { llListen(0, "",llGetOwner(),""  ; } listen( integer channel, string name, key id, string message ) { list params = llParseString2List( message, [" "], [""] ); if (llList2String(params, 0)=="set" { integer i=0; for (i=2; i<llGetListLength( params )+1; i++ ) llSetTexture( llList2String( params, 1 ), llList2Integer( params, i )); } //- command set if (llList2String(params, 0)=="delete"  { llRemoveInventory( llGetScriptName() ); } //- command delete } }
|
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
12-31-2007 15:37
> I would also like it to be usable by someone who can mod my objects if possible, rather than just restricting it to owner only. Hmm... if you replace this line: llListen(0, "",llGetOwner(),""  ; With this: llListen(0, "",NULL_KEY,""  ; Then anyone can change the texture. Not sure how to set it so anyone with mod perms can change it. If the object changes hands, resetting the script (in its current form) will make it start listening to the new owner. > It has one annoying bug, which is that it ALWAYS set the texture on face 0, even if another face is specified in chat Not really sure what's causing that. Does it set face 0 in addition to the face you specify in chat? The bug might be here: for (i=2; i<llGetListLength( params )+1; i++ ) Try taking out the +1, so you're left with: for (i=2; i<llGetListLength( params ); i++ ) See if that fixes it.
|
|
Isobel DeSantis
Rechargeable ...
Join date: 1 Jan 2007
Posts: 104
|
01-04-2008 12:16
Thank you so much, that fixed the problem completely!  Would it be possible to use llSetColor in the same script, and in the same way, or would it need to be separately? Thanks again 
_____________________
http://slurl.com/secondlife/West%20Sunset/208/126/22  http://www.angelsblog.net/ A great many people think they are thinking when they are merely rearranging their prejudices. ~ William James
|
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
01-04-2008 13:33
llSetColor should work pretty much the same way, I would think.
|