Created
October 28, 2014 02:20
-
-
Save nebadon2025/33f00437aa4f71f7bd99 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is an extremely simple script to identify the number of the face clicked. | |
// Useful primarily for taking the numbers and using them with scripts that | |
// affect faces on a prim (for example texture modifiers). | |
// | |
// - Xugu Madison | |
default | |
{ | |
on_rez(integer param) | |
{ | |
llResetScript(); | |
} | |
state_entry() | |
{ | |
llOwnerSay("Touch me to identify the number of each face on this prim."); | |
} | |
touch_start(integer touchCount) | |
{ | |
integer touchIdx; | |
for (touchIdx = 0; touchIdx < touchCount; touchIdx++) | |
{ | |
if (llDetectedKey(touchIdx) != llGetOwner()) | |
{ | |
return; | |
} | |
integer face=llDetectedTouchFace(touchIdx); | |
llOwnerSay("You touched face #" | |
+ (string)face + "."); | |
llOwnerSay("That face currently has texture UUID: " | |
+ (string)llGetTexture(face) ); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment