// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Minute-boundary sound cue // Not compiled or tested in-world // Setup: Add a short sound cue. Owner-touch arms/disarms; first cue happens at the next minute boundary. // Stop / restore: Touch to disarm and stop attached playback. // 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. Samples every second. A delayed script plays at most one cue, rather than catching up with a burst. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. integer active; integer minute; default { touch_start(integer n) { if(llDetectedKey(0)!=llGetOwner())return; active=!active; if(active) { minute=llGetUnixTime()/60; llSetTimerEvent(1.0); } else { llSetTimerEvent(0.0); llStopSound(); } } timer() { integer now=llGetUnixTime()/60; if(now!=minute) { minute=now; if(llGetInventoryType("cue")==INVENTORY_SOUND)llPlaySound("cue",0.2); } } }