// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Fold elapsed time into a back-and-forth cycle // Not compiled or tested in-world // Setup: Put in a spare owned prim. Set positive PERIOD for a full out-and-back cycle and sample TIMES. Owner touch prints calculations only. // Stop / restore: Disable/remove. No prim motion or appearance is changed. // Notes: Uses floor-based wrapping so negative input times remain well-defined. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Motion planning only. float PERIOD=4.0; list TIMES=[0.0,1.0,2.0,3.0,4.0,5.0]; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(PERIOD<=0.0) { llOwnerSay("Positive period required."); return; } integer i; for(i=0;i