// Wolf Flash - touch to make this object flash between two colours; touch again to stop. // Uses the wolf-commands plugin through wolfCall("object.flash", ...): the region does the flashing, so this script // needs no timer, and the object's own colours come back when the flash ends or is stopped. // Works on rezzed objects you own (not on attachments or HUDs). Wolf Territories, 2026. Copy, change and share freely. vector COLOUR_A = <1.0, 0.0, 0.0>; // red vector COLOUR_B = <1.0, 1.0, 0.0>; // yellow float EACH = 0.5; // seconds each colour shows: 0.5 to 60 float FOR = 0.0; // seconds the flash lasts: 0 = until stopped (at most an hour) integer flashing; default { touch_start(integer n) { if (llDetectedKey(0) != llGetOwner()) return; if (!flashing) { // [link, colour A, colour B, seconds each colour, seconds in all, face] list r = wolfCall("object.flash", [LINK_SET, COLOUR_A, COLOUR_B, EACH, FOR, ALL_SIDES]); if (llGetListLength(r) == 0) { llOwnerSay("Could not flash: " + wolfGetLastError()); return; } // ["ok", prims flashing, seconds each colour, seconds in all] llOwnerSay("Flashing " + llList2String(r, 1) + " prims. Touch again to stop."); flashing = TRUE; } else { // ["ok", prims stopped]: their own colours are back wolfCall("object.flash.stop", [LINK_SET]); flashing = FALSE; } } on_rez(integer p) { llResetScript(); } }