// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Point at distance along a polyline // Not compiled or tested in-world // Setup: Use a spare owned prim. Set POINTS and nonnegative DISTANCE. Touch for owner-only results. // Stop / restore: Disable/remove. No scene properties change. // Notes: Duplicate points are skipped naturally. Distances longer than the route clamp to the final point. // License: see LICENSE in this distribution. // Original Incoprea. MIT. list POINTS=[<0.0,0.0,0.0>,<3.0,0.0,0.0>,<3.0,4.0,0.0>,<6.0,4.0,2.0>]; float DISTANCE=5.0; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; integer n=llGetListLength(POINTS); if(n<1||DISTANCE<0.0) { llOwnerSay("Need points and nonnegative distance."); return; } float remaining=DISTANCE; integer i; for(i=1;i0.000001&&remaining<=length) { llOwnerSay("Point="+(string)(a+(b-a)*(remaining/length))); return; } remaining-=length; } llOwnerSay("Clamped endpoint="+(string)llList2Vector(POINTS,-1)); } }