// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Find the lit face // Not compiled or tested in-world // Setup: Put in a spare multi-face prim with modest original glow. Owner-touch starts. Rotate the camera or object to find and touch the glowing face. // Stop / restore: Correct touch or a 15-second timeout restores all original glow values. Wait for restoration before deleting or resetting. // Notes: Faces on complex meshes may be hard to locate; start with a simple cube. Uses touch-face data and does not change colors, lights, or ownership. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. Not compiled or tested in-world. list original; integer active; integer target; restore() { integer face; for (face = 0; face < llGetListLength(original); ++face) llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_GLOW, face, llList2Float(original, face)]); active = FALSE; llSetTimerEvent(0.0); } default { state_entry() { integer face; for (face = 0; face < llGetNumberOfSides(); ++face) original += llGetLinkPrimitiveParams(LINK_THIS, [PRIM_GLOW, face]); } touch_start(integer count) { if (llDetectedKey(0) != llGetOwner()) return; if (!active) { target = (integer)llFrand((float)llGetListLength(original)); active = TRUE; llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_GLOW, target, 0.15]); llSetTimerEvent(15.0); llOwnerSay("Find and touch the glowing face."); } else if (llDetectedTouchFace(0) == target) { restore(); llOwnerSay("Found it! Touch to start another round."); } } timer() { restore(); llOwnerSay("Round ended; original glow restored."); } }