// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // One-shot keyframed presentation turn // Not compiled or tested in-world // Setup: Use an unattached nonphysical root already configured for KFM-compatible accounting. Owner-touch starts; touching while running cancels. // Stop / restore: At completion the new orientation remains. A touch while running clears motion in place; manually restore any desired previous orientation. // Notes: Do not change link topology, attachment state or physics while running. Selection can pause simulator motion. One-shot examples keep their armed flag until the next owner touch clears it, even after the path finishes; they do not infer completion from wall-clock timers. Use a small object with clear surroundings. This is real geometry motion, not target-omega. No automatic physics-shape changes; grid support varies. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. integer active; default { touch_start(integer n) { if(llDetectedKey(0)!=llGetOwner()||llGetLinkNumber()>1||llGetAttached()||llGetStatus(STATUS_PHYSICS))return; if(active) { llSetKeyframedMotion([],[]); active=FALSE; llSetTimerEvent(0.0); return; } active=TRUE; llSetKeyframedMotion([llEuler2Rot(<0.0,0.0,PI_BY_TWO>),4.0],[KFM_DATA,KFM_ROTATION,KFM_MODE,KFM_FORWARD]); } changed(integer change) { if(change&CHANGED_LINK) { llSetKeyframedMotion([],[]); active=FALSE; llSetTimerEvent(0.0); } } }