// IF YOU VALUE THIS WORK, PLEASE LEAVE ATTRIBUTION INTACT // // // // _|_| // // _| _| _|_|_|_| _|_| _|_|_| _|_| // // _| _| _| _| _| _| _| _|_|_|_| // // _| _| _| _| _| _| _| _| // // _|_| _|_|_|_| _|_| _| _| _|_|_| // // MiniVerse // //............................................................// //.....................▒▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▓▓░....................// //.................._▒▓▒.Ozone.MiniVerse.▒▓▒_.................// //................_▒▓▓▓▒____PRESENTS____▒▓▓▓▓▓▒_..............// //..............░▓▓▓▓▓▓▒___I.M.A.G.E.___▒▓▓▓▓▓▓▓░.............// //.............▒▓▓▓▓▓▓▓▒__IMAGE_MATRIX__▒▓▓▓▓▓▓▓▓▒............// //............▒▓▒▓▓▓▓▒_ACTION_GAME_ENGINE_▒▓▓▓▓▒▓▓▒...........// //..........▒▓▓▓▓░...▒▓▓▒_By_Spax_Orion_▒▓▓▒...░▓▓▓▓▒.........// //.........▒▓▓▓▓░......▒▓_& Dirty Helga_▓▓▒░.....░▒▓▓▓........// //.........▓▓▓▓▒░.._......░▒▓▓▓▓▓▓▓▓▓▓▓▒░......_..░▒▓▓▓.......// //.........▓▓▓▓░.._▓░▓░_....▓▓▓▓▓▓▓▓▓▓...._▒▓▒▓_..░▓▓▓▓.......// //.........▓▓▓▓.._▓█░▒█▒.....▒▓▓▓▓▓▓▒.....▒█▒░█▒_..▓▓▓▓.......// //........▒▓▓▓▓▓▒_..▒._░_▒▓▓▒░.▒▒.░▒▓▓▒_░_.▒.._▒▓▓▓▓▓▓▒.......// //.......▒▓▓▓▓▓▓▓▓▓_...▒▓▓▓▓▓░..▒▒..░▓▓▓▓▓▒..._▓▓▓▓▓▓▓▓▒......// //......▓▓▓▓▓▓▓▓▓▓▓_.▓▓▓▓▓▒.._▓▓▓█_..▒▓▓▓▓▓._▓▓▓▓▓▓▓▓▓▓▓......// //......▓▓▓▓▓▒▒▓▓▓▒▓▓▓▓▓▓▒░.▒▓▓▓▓▓█▒.░▒▓▓▓▓▓▒▒▓▓▓▒▓▓▓▓▓▓......// //......▓▓▓▓▓░.▓▓▓.▒▓▓▓▓▓░..▒▓▓▓▓▓▓▒..░▓▓▓▓▓░.▓▓▓.░▓▓▓▓▓......// //........▒▓▓█░.▓▓▓.▒▓▓▓▓▓__▓_..▒▒.._▓__▓▓▓▓▓░.▓▓▓.▒▓▓▓▒......// //.........░▒░░▒▓▒░▒▓▓▓▓▓▓▒▒▓▒▒▒▓▓▒▒▒▓▒▒▓▓▓▓▓▒░▒▓▒░░▒░░.......// //.........░▒.░▓▓░.▓▓▓▓█▒▒▒█▒▒▒█▒▒█▒▒▒█▒▒▒█▓▓▓▓.░▓▓░.▒░.......// //.............░▓▓░_▓▓▓▓█................█▓▓▓▓_░▓▓░...........// //..............░▒▓▓▓█▓._▒_.█░....█░._█_.▓█▓▓▓▒░..............// //.................░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░................// //.................░▒▓▓▓▒▒▓▒▒▓▓▓▓▒▒▓▓▓▓▒▒▓▓▒░.................// //..................▒▓▓░░▓░░▓▓▓▓░░▓▓▓▓░░▓▓▒...................// //.................▒▓░..█__▓▓▓▓__▓▓▓▓__█..░▓▒.................// //...................░...░..░▓▓░..░▓▓░..░...░.................// //.................... ..░...░▒░....░▒░...░...................// //............................................................// // Common sense not included and must be supplied by end user // // Read ENTIRE script first and LEARN: KNOW what you're using // // CC BY-NC https://creativecommons.org/licenses/by-nc/4.0/ // // ===========================================================// // Broken-neon style: random micro-flick bursts + occasional // // longer dropouts. Great for color images isolated on black. // // Flickers black and then WHITE: Leave face on Full Bright // // OpenSim 0.9.2.1 friendly // // ===========================================================// // CC BY-NC // https://creativecommons.org/licenses/by-nc/4.0/ // --------- USER CONFIG (TOP) --------- integer TARGET_LINK = LINK_THIS; // If script is in the sign prim: LINK_THIS. // If script is in the root prim: set this to the sign's link number. integer TARGET_FACE = 1; //What face of the prim do we print to? // "On" neon color (tint) and base glow/ behavior via PRIM_COLOR . // Note: PRIM_COLOR affects face transparency; use 1.0 if you only want color changes. vector NEON_ON_COLOR = <1.0, 1.0, 1.0>; // red-ish neon tint vector NEON_OFF_COLOR = <0.0, 0.0, 0.0>; // nearly black but with a hint of red float ON_ALPHA = 1.0; float OFF_ALPHA = 1.0; // Flicker cadence float MIN_STEADY_ON = 2.0; // seconds (normal "good" glow) minimum float MAX_STEADY_ON = 7.0; // seconds maximum float MIN_BLACKOUT = 0.20; // seconds minimum blackout float MAX_BLACKOUT = 0.80; // seconds maximum blackout // Micro-flicker burst behavior integer MIN_BURST_TICKS = 3; // number of rapid toggles (on/off) minimum integer MAX_BURST_TICKS = 12; // maximum float MIN_TICK = 0.04; // rapid toggle timing min (seconds) float MAX_TICK = 0.14; // rapid toggle timing max // Probability controls (0.0 to 1.0) float PROB_BURST_AFTER_STEADY = 0.65; // chance that after steady-on we do a burst float PROB_LONG_BLACKOUT = 0.18; // chance that blackout is "long" // "Jitter" (brightness wobble) while ON: // We simulate brightness jitter by scaling the ON color randomly each ON tick. // Keep subtle for "clean" broken neon. float MIN_ON_INTENSITY = 0.70; float MAX_ON_INTENSITY = 1.00; // --------- INTERNAL STATE --------- integer gIsOn = TRUE; // Mode machine // 0 = steady on // 1 = burst toggling // 2 = blackout (off) integer gMode = 0; integer gBurstTicksRemaining = 0; // --------- HELPERS --------- setFaceColor(vector c, float alpha) { llSetLinkPrimitiveParamsFast( TARGET_LINK, [PRIM_COLOR, TARGET_FACE, c, alpha] ); } vector scaleColor(vector c, float s) { // Clamp to [0..1] vector out = ; if (out.x > 1.0) out.x = 1.0; if (out.x < 0.0) out.x = 0.0; if (out.y > 1.0) out.y = 1.0; if (out.y < 0.0) out.y = 0.0; if (out.z > 1.0) out.z = 1.0; if (out.z < 0.0) out.z = 0.0; return out; } turnOnJitter() { float s = MIN_ON_INTENSITY + llFrand(MAX_ON_INTENSITY - MIN_ON_INTENSITY); setFaceColor(scaleColor(NEON_ON_COLOR, s), ON_ALPHA); gIsOn = TRUE; } turnOff() { setFaceColor(NEON_OFF_COLOR, OFF_ALPHA); gIsOn = FALSE; } float randRange(float a, float b) { return a + llFrand(b - a); } startSteadyOn() { gMode = 0; // show ON with a little jitter immediately turnOnJitter(); llSetTimerEvent(randRange(MIN_STEADY_ON, MAX_STEADY_ON)); } startBurst() { gMode = 1; gBurstTicksRemaining = MIN_BURST_TICKS + (integer)llFrand((float)(MAX_BURST_TICKS - MIN_BURST_TICKS + 1)); // start quickly llSetTimerEvent(randRange(MIN_TICK, MAX_TICK)); } startBlackout() { gMode = 2; turnOff(); float dur = randRange(MIN_BLACKOUT, MAX_BLACKOUT); // Sometimes go longer, like a dying transformer if (llFrand(1.0) < PROB_LONG_BLACKOUT) { dur += randRange(0.6, 2.2); } llSetTimerEvent(dur); } // --------- EVENTS --------- default { state_entry() { // Initialize to "on" startSteadyOn(); } on_rez(integer p) { llResetScript(); } changed(integer c) { if (c & CHANGED_LINK) llResetScript(); } timer() { if (gMode == 0) { // steady-on period ended: choose burst vs blackout vs another steady-on if (llFrand(1.0) < PROB_BURST_AFTER_STEADY) { startBurst(); } else { startBlackout(); } return; } if (gMode == 1) { // burst tick: toggle state rapidly if (gIsOn) turnOff(); else turnOnJitter(); gBurstTicksRemaining--; if (gBurstTicksRemaining <= 0) { // After a burst, usually drop to blackout briefly, then recover startBlackout(); return; } llSetTimerEvent(randRange(MIN_TICK, MAX_TICK)); return; } if (gMode == 2) { // blackout ended: recover to steady on startSteadyOn(); return; } } }