// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Route a touched grid cell to a named action // Not compiled or tested in-world // Setup: Use a spare ordinary cube owned by you. Touch different cells; labels are printed rather than executed. Surface mapping can differ on meshes; test one face first. // Stop / restore: Disable/remove; these controllers report privately and do not alter scene properties. Reset clears gesture/session state. // Notes: Rows count from the bottom. Exactly-edge coordinates are clamped into the final cell. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Owner input only. list ACTIONS=["previous","play","next","quiet","help","home"]; integer ownerTouch() { return llDetectedKey(0)==llGetOwner(); } integer usable(vector uv) { return llDetectedTouchFace(0)>=0&&uv!=TOUCH_INVALID_TEXCOORD; } default { touch_start(integer n) { if(!ownerTouch())return; vector uv=llDetectedTouchST(0); if(!usable(uv))return; integer column=llFloor(uv.x*3.0); integer row=llFloor(uv.y*2.0); if(column<0)column=0; if(column>2)column=2; if(row<0)row=0; if(row>1)row=1; llOwnerSay("Action="+llList2String(ACTIONS,row*3+column)); } changed(integer flags) { if(flags&CHANGED_OWNER)llResetScript(); } }