// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Press and release audio button // Not compiled or tested in-world // Setup: Add short sounds press and release. Owner presses and releases the prim. // Stop / restore: Remove/disable; Stop sound in this prim silences a remaining 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 attached sound so the release can interrupt a long press clip. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. default { touch_start(integer n) { if(llDetectedKey(0)==llGetOwner()&&llGetInventoryType("press")==INVENTORY_SOUND)llPlaySound("press",0.25); } touch_end(integer n) { if(llDetectedKey(0)==llGetOwner()&&llGetInventoryType("release")==INVENTORY_SOUND)llPlaySound("release",0.25); } }