// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Named sound button bank // Not compiled or tested in-world // Setup: Put script and licensed sounds in root. Put exact sound names in child descriptions; child buttons should pass touch events. Owner-touch a child. // Stop / restore: Disable/remove; Stop sound in the root can silence the current clip. // Notes: Use licensed sounds in the exact prim containing the script. Playback is audible nearby. Asset loading and simulator timers can introduce delays; these are exhibit cues, not sample-accurate audio. Uses a fixed inventory lookup, not arbitrary remote sound identifiers. Children provide labels only. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. default { touch_start(integer n) { if(llDetectedKey(0)!=llGetOwner()||llGetLinkNumber()>1)return; integer link=llDetectedLinkNumber(0); if(link<2)return; string sound=llList2String(llGetLinkPrimitiveParams(link,[PRIM_DESC]),0); if(llGetInventoryType(sound)==INVENTORY_SOUND)llPlaySound(sound,0.3); else llOwnerSay("No sound named "+sound+" in root."); } }