Difference between revisions of "User:Fred Gandt/Scripts/Continued 4"
Fred Gandt (talk | contribs) m (→Touch Texture Setter: and another oops) |
Fred Gandt (talk | contribs) m (→Touch Texture Setter ( V1 ): And another. I am not in a very good mood and am thus not concentrating.) |
||
Line 37: | Line 37: | ||
<lsl>// V1 // | <lsl>// V1 // | ||
key texture_uuid = "f05755e7-d31c-116d-9cf2-a4840bdfc56b"; | key texture_uuid = "f05755e7-d31c-116d-9cf2-a4840bdfc56b"; | ||
integer tc; | integer tc; | ||
Line 53: | Line 53: | ||
while(nd--) | while(nd--) | ||
{ | { | ||
if(llDetectedKey( | if(llDetectedKey(nd) == owner) | ||
{ | { | ||
tc = 0; | tc = 0; | ||
llSetTexture(texture_uuid, llDetectedTouchFace( | llSetTexture(texture_uuid, llDetectedTouchFace(nd)); | ||
} | } | ||
} | } | ||
Line 64: | Line 64: | ||
while(nd--) | while(nd--) | ||
{ | { | ||
if(llDetectedKey( | if(llDetectedKey(nd) == owner) | ||
{ | { | ||
if((++tc) == 20) | if((++tc) == 20) |
Revision as of 02:44, 28 March 2010
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
My Contributions
I have implemented a V# system to make it more obvious if a script is updated. The V# forms part of the title of each script.
If you have any comments about the content of this page please post them HERE
More Pages
Free Scripts (content constantly updating)
More Free Scripts (content constantly updating)
Even More Free Scripts (content constantly updating)
Even More More Free Scripts (content constantly updating)
Legal Stuff
The legal stuff about contributing to this wiki (worth reading).
Tuition
Tuition scripts, notes, videos and screenshots etc. (hardly any content yet)
Free Scripts
Touch Texture Setter ( V1 )
Fill out the UUID for the texture to set. Drop the script in the prim to texture. The texture then sets on each face touched. A long held touch will delete the script.
<lsl>// V1 //
key texture_uuid = "f05755e7-d31c-116d-9cf2-a4840bdfc56b";
integer tc;
key owner;
default {
state_entry() { owner = llGetOwner(); } touch_end(integer nd) { while(nd--) { if(llDetectedKey(nd) == owner) { tc = 0; llSetTexture(texture_uuid, llDetectedTouchFace(nd)); } } } touch(integer nd) { while(nd--) { if(llDetectedKey(nd) == owner) { if((++tc) == 20) llRemoveInventory(llGetScriptName()); } } }
}</lsl>
More Scripts...
Free Scripts (content constantly updating)
More Free Scripts (content constantly updating)
Even More Free Scripts (content constantly updating)
Even More More Free Scripts (content constantly updating)
If you have any comments about the content of this page please post them HERE