// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Four-panel image wall // Not compiled or tested in-world // Setup: Add texture art to root. Name four children tile00, tile10, tile01, tile11. Use face0/default mapping with matching face orientations. // Stop / restore: Owner-touch applies/restores the four saved diffuse mappings. // Notes: Use a spare modifiable build. Snapshot state is held only in script memory; restore before reset/removal. Do not relink during a preview. Names encode column,row with row0 at bottom in UV space. Duplicate or missing names reject the preview. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. list links; list saved; integer preview; integer valid=TRUE; default { touch_start(integer n) { if(llDetectedKey(0)!=llGetOwner()||llGetLinkNumber()>1||!valid)return; integer i; if(preview) { for(i=0;i<4;++i)llSetLinkPrimitiveParamsFast(llList2Integer(links,i),[PRIM_TEXTURE,0]+llList2List(saved,i*4,i*4+3)); preview=FALSE; return; } if(llGetInventoryType("art")!=INVENTORY_TEXTURE)return; links=[]; saved=[]; list names=["tile00","tile10","tile01","tile11"]; for(i=0;i<4;++i) { integer j; integer found; integer count; for(j=2;j<=llGetObjectPrimCount(llGetKey());++j)if(llGetLinkName(j)==llList2String(names,i)) { found=j; ++count; } if(count!=1) { llOwnerSay("Need four unique tile names."); return; } links+=[found]; } for(i=0;i<4;++i) { integer link=llList2Integer(links,i); saved+=llGetLinkPrimitiveParams(link,[PRIM_TEXTURE,0]); vector offset=<-0.25,-0.25,0.0>; if(i%2)offset.x=0.25; if(i/2)offset.y=0.25; llSetLinkPrimitiveParamsFast(link,[PRIM_TEXTURE,0,"art",<0.5,0.5,0.0>,offset,0.0]); } preview=TRUE; } changed(integer change) { if(change&CHANGED_LINK)valid=FALSE; } }