// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Spoken start countdown // Not compiled or tested in-world // Setup: Add very short sounds three, two, one and go. Owner-touch begins; touch again cancels. // Stop / restore: Touch while active to cancel and silence. Finished audio can be stopped with Stop sound in this prim. // Notes: Use licensed inventory sounds in the specified prim. Audio is nearby, not private. Simulator timers and viewer loading are approximate. Suitable for a casual exhibit cue, not a race adjudication system. All clips must be shorter than one second. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. list cues=["three","two","one","go"]; integer active; integer index; next() { if(index>=4) { active=FALSE; llSetTimerEvent(0.0); return; } string sound=llList2String(cues,index++); if(llGetInventoryType(sound)==INVENTORY_SOUND)llPlaySound(sound,0.3); } default { touch_start(integer n) { if(llDetectedKey(0)!=llGetOwner())return; active=!active; if(active) { index=0; next(); llSetTimerEvent(1.0); } else { llSetTimerEvent(0.0); llStopSound(); } } timer() { next(); } }