// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Morse-code teaching beacon // Not compiled or tested in-world // Setup: Put in a spare prim and set FACE. Owner-touch starts or stops. Uses half-second timing units and a low glow. // Stop / restore: Touch to restore the captured fullbright and glow values before removal or reset. // Notes: A teaching prop, not an emergency signaling system. Timer lag changes timing; use a modest display size and avoid intense glow. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. Not compiled or tested in-world. integer FACE = 0; list units = [1,1,1,1,1,3,3,1,3,1,3,3,1,1,1,1,1,7]; integer index; integer active; integer fullbright; float glow; default { state_entry() { list saved = llGetLinkPrimitiveParams(LINK_THIS, [PRIM_FULLBRIGHT, FACE, PRIM_GLOW, FACE]); fullbright = llList2Integer(saved, 0); glow = llList2Float(saved, 1); } touch_start(integer count) { if (llDetectedKey(0) != llGetOwner()) return; active = !active; if (active) { index = 0; llSetTimerEvent(0.1); } else { llSetTimerEvent(0.0); llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_FULLBRIGHT, FACE, fullbright, PRIM_GLOW, FACE, glow]); } } timer() { integer on = !(index % 2); float value = 0.0; if (on) value = 0.08; llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_FULLBRIGHT, FACE, on, PRIM_GLOW, FACE, value]); llSetTimerEvent(0.5 * llList2Integer(units, index)); index = (index + 1) % llGetListLength(units); } }