// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Linked radial display layout // Not compiled or tested in-world // Setup: Put in nonphysical root. Name up to 12 children radial_item. Ring radius is one meter; Restore recovers both local positions and rotations. // Stop / restore: Use the Restore or Home action described in setup before removing or resetting if you want the startup appearance. Menu listeners expire after 45 seconds. // Notes: Local owner-only control. Saved snapshots live in script memory and are lost on reset. Use small items and clear space. Real prim transforms change; seated avatars are not targeted. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. integer channel; integer handle; close() { if(handle)llListenRemove(handle); handle=0; llSetTimerEvent(0.0); } menu(string prompt,list buttons) { if(!handle) { channel=-1000-(integer)llFrand(1000000.0); handle=llListen(channel,"",llGetOwner(),""); } llDialog(llGetOwner(),prompt,buttons,channel); llSetTimerEvent(45.0); } list links; list poses; init() { integer i; for(i=2;i<=llGetObjectPrimCount(llGetKey())&&llGetListLength(links)<12;++i)if(llGetLinkName(i)=="radial_item") { links+=[i]; poses+=llGetLinkPrimitiveParams(i,[PRIM_POS_LOCAL,PRIM_ROT_LOCAL]); } } show() { menu("Radial exhibit layout",["Ring","Restore"]); } choose(string s) { if(llGetStatus(STATUS_PHYSICS)||llGetLinkNumber()>1||(s!="Ring"&&s!="Restore"))return; integer i; integer n=llGetListLength(links); for(i=0;i; r=llEuler2Rot(<0.0,0.0,a>); } llSetLinkPrimitiveParamsFast(llList2Integer(links,i),[PRIM_POS_LOCAL,p,PRIM_ROT_LOCAL,r]); } show(); } default { state_entry() { init(); } touch_start(integer n) { if(llDetectedKey(0)!=llGetOwner())return; close(); show(); } listen(integer ch,string name,key id,string message) { if(!handle||ch!=channel||id!=llGetOwner())return; choose(message); } timer() { close(); } changed(integer change) { if(change&CHANGED_OWNER)llResetScript(); } }