// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Paint just the touched face // Not compiled or tested in-world // Setup: Put in a spare prim. Owner-touch individual faces. The script captures every face color when saved. // Stop / restore: Touch each painted face again to restore it before deleting. Reset only when restored. // Notes: Touch-face support depends on the viewer. Does not change alpha, textures, or PBR material parameters. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. Not compiled or tested in-world. list colors; list painted; default { state_entry() { integer face; for (face = 0; face < llGetNumberOfSides(); ++face) { colors += [llGetColor(face)]; painted += [FALSE]; } } touch_start(integer count) { if (llDetectedKey(0) != llGetOwner()) return; integer face = llDetectedTouchFace(0); if (face < 0 || face >= llGetListLength(colors)) return; integer on = !llList2Integer(painted, face); painted = llListReplaceList(painted, [on], face, face); if (on) llSetColor(<0.35, 0.95, 0.7>, face); else llSetColor(llList2Vector(colors, face), face); } }