// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Box-bounded sound exhibit // Not compiled or tested in-world // Setup: Add exhibit_sound to the prim. Owner-touch plays; adjust HALF_EXTENT in meters. // Stop / restore: A triggered sound cannot be stopped by llStopSound; let the short clip finish, then disable/remove. // 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. Bounds use world/region axes, not object rotation. The sound stays at its trigger position if the prim moves. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. vector HALF_EXTENT=<3.0,3.0,2.0>; default { touch_start(integer n) { if(llDetectedKey(0)!=llGetOwner()||llGetInventoryType("exhibit_sound")!=INVENTORY_SOUND)return; vector p=llGetPos(); llTriggerSoundLimited("exhibit_sound",0.3,p+HALF_EXTENT,p-HALF_EXTENT); } }