// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Reassemble a tiny message out of order // Not compiled or tested in-world // Setup: Place in a spare owned prim. Touch repeatedly; the sample order is2,0,1. Owner touch runs the local demonstration. // Stop / restore: Disable/remove. No external requests or scene changes occur; reset clears memory. // Notes: Slots and message identity are fixed for this teaching example. A real receiver also needs size limits, sender validation, message IDs and expiry. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Local owner-only protocol laboratory. list ORDER=[2,0,1]; list TEXT=["hello ","virtual ","world"]; list slots=["","",""]; integer received; integer cursor; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(cursor>=3) { llOwnerSay("Already complete; reset to replay."); return; } integer index=llList2Integer(ORDER,cursor); ++cursor; slots=llListReplaceList(slots,[llList2String(TEXT,index)],index,index); received=received|(1<