// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Particle budget comparison menu // Not compiled or tested in-world // Setup: Use a particle-free prim. Owner-touch selects Low, Medium or Off. Effects automatically end after thirty seconds. // Stop / restore: Owner-touch or choose Off as described; let finite pulses expire. Clear particles before removal. These examples cannot recover a pre-existing particle system. // Notes: Use an otherwise particle-free prim. Particle systems persist independently of scripts. Demonstrates birth rate versus particle lifetime; viewer budgets may suppress particles. It does not change viewer preferences. // 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; llParticleSystem([]); llSetTimerEvent(0.0); } default { touch_start(integer n) { if(llDetectedKey(0)!=llGetOwner())return; close(); channel=-1000-(integer)llFrand(1000000.0); handle=llListen(channel,"",llGetOwner(),""); llDialog(llGetOwner(),"Compare particle birth rate",["Low","Medium","Off"],channel); llSetTimerEvent(30.0); } listen(integer ch,string name,key id,string s) { if(!handle||ch!=channel||id!=llGetOwner())return; if(s=="Off") { close(); return; } integer count; if(s=="Low")count=1; else if(s=="Medium")count=3; else return; llParticleSystem([PSYS_SRC_PATTERN,PSYS_SRC_PATTERN_EXPLODE,PSYS_PART_START_COLOR,<0.4,0.8,1.0>,PSYS_PART_START_SCALE,<0.05,0.05,0.0>,PSYS_PART_MAX_AGE,1.0,PSYS_SRC_BURST_RATE,0.25,PSYS_SRC_BURST_PART_COUNT,count,PSYS_SRC_BURST_SPEED_MIN,0.1,PSYS_SRC_BURST_SPEED_MAX,0.2,PSYS_SRC_MAX_AGE,30.0]); llSetTimerEvent(30.0); } timer() { close(); } }