Skip to content

Instantly share code, notes, and snippets.

@nebadon2025
Created October 28, 2014 02:20
Show Gist options
  • Save nebadon2025/33f00437aa4f71f7bd99 to your computer and use it in GitHub Desktop.
Save nebadon2025/33f00437aa4f71f7bd99 to your computer and use it in GitHub Desktop.
// 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