// 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/ // // ===========================================================// // IMAGE visual tracer + red particles, lightweight) // // BUILD HOLD mode: rez with start_param == 777 // // ===========================================================// // ---------------- BUILD HOLD ---------------- integer BUILD_PARAM = 777; // special rez param to keep slug alive for editing integer gBuildHold = FALSE; // make a pretty bullet and put this script inside //take into inventory and put in your gun. // ---------------- LIFETIME / PHYSICS ---------------- float LIFE_SEC = 2.5; // normal bullet lifetime float BOUYANCY = 1.0; // ---------------- IMPACT FEEDBACK ---------------- string HIT_SOUND = "splat"; float HIT_VOLUME = 1.0; // ---------------- PARTICLE TEXTURE ---------------- string TRAIL_TEX_NAME = "s-hit"; // texture in slug inventory key gTrailTexKey = NULL_KEY; // cached UUID (more reliable than name on older OpenSim) // ---------------- CAGE HIT REPORTING ---------------- // Must match the main controller's listen channel later. integer CH_CAGE_HIT = -733101; // Optional debug integer DEBUG = FALSE; debug(string s) { if (DEBUG) llOwnerSay(s); } key loadTrailTextureKey() { if (llGetInventoryType(TRAIL_TEX_NAME) == INVENTORY_TEXTURE) return llGetInventoryKey(TRAIL_TEX_NAME); return NULL_KEY; } startRedTrail() { // Using UUID is more reliable than inventory-name on some OpenSim builds. // If NULL_KEY, particles may render textureless but still tinted red. llParticleSystem([ PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK, PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_DROP, PSYS_SRC_MAX_AGE, 0.0, // emit forever unless we stop it PSYS_SRC_TEXTURE, gTrailTexKey, PSYS_SRC_BURST_RATE, 0.01, PSYS_SRC_BURST_PART_COUNT, 1, PSYS_SRC_BURST_RADIUS, 0.0, PSYS_PART_MAX_AGE, 0.35, PSYS_PART_START_COLOR, <1.0, 0.0, 0.0>, PSYS_PART_END_COLOR, <1.0, 0.0, 0.0>, PSYS_PART_START_ALPHA, 0.9, PSYS_PART_END_ALPHA, 0.0, PSYS_PART_START_SCALE, <0.10, 0.10, 0.0>, PSYS_PART_END_SCALE, <0.02, 0.02, 0.0>, PSYS_SRC_ACCEL, <0.0, 0.0, 0.0> ]); } // CAGE hit report for kill attribution (controller will cache last damager per NPC) reportHit(key victim) { if (victim == NULL_KEY) return; // Shooter is always the owner of the slug (rezzed by weapon attached/tracking them) key shooter = llGetOwner(); if (shooter == NULL_KEY) return; llRegionSay(CH_CAGE_HIT, "HIT|" + (string)shooter + "|" + (string)victim); } impactAndDie(key victim) { // Report hit before dying (only in normal mode) reportHit(victim); if (llGetInventoryType(HIT_SOUND) == INVENTORY_SOUND) llPlaySound(HIT_SOUND, HIT_VOLUME); llDie(); } setup(integer start_param) { gBuildHold = (start_param == BUILD_PARAM); // Cache texture UUID once per rez/setup gTrailTexKey = loadTrailTextureKey(); llSetStatus(STATUS_PHYSICS, TRUE); llSetStatus(STATUS_DIE_AT_EDGE, TRUE); llSetBuoyancy(BOUYANCY); startRedTrail(); if (!gBuildHold) { // Normal bullet behavior: disposable llSetPrimitiveParams([PRIM_TEMP_ON_REZ, TRUE]); llSetTimerEvent(LIFE_SEC); } else { // Build hold behavior: persistent & safe to take llSetPrimitiveParams([PRIM_TEMP_ON_REZ, FALSE]); llSetTimerEvent(0.0); } } default { state_entry() { // If rezzed by hand without param, treat as BUILD HOLD so it doesn't vanish. setup(BUILD_PARAM); } on_rez(integer start_param) { setup(start_param); } collision_start(integer n) { if (gBuildHold) return; // Report only the FIRST thing we hit (good enough; keeps it lightweight) key victim = llDetectedKey(0); impactAndDie(victim); } land_collision_start(vector v) { if (gBuildHold) return; v = <0,0,0>; // Land hit: victim is NULL_KEY (still plays sound and dies) impactAndDie(NULL_KEY); } timer() { if (gBuildHold) return; llDie(); } }