Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
archiv:opensim:downloads:scripts:fire_particle [2024/01/24 16:39] – Externe Bearbeitung 127.0.0.1 | archiv:opensim:downloads:scripts:fire_particle [Unbekanntes Datum] (aktuell) – Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ===== Fire Particle ===== | ||
+ | |||
+ | < | ||
+ | //// " | ||
+ | //// You are free to use this script as you please, so long as you include this line: | ||
+ | //** The original ' | ||
+ | |||
+ | // SETUP: | ||
+ | // Particles should start automatically. (Reset) the script if you insert a | ||
+ | // particle texture later on. Add one or more CONTROLLER TEMPLATES to any | ||
+ | // prims in the linked object to control when particles turn ON and OFF. | ||
+ | |||
+ | // Customize the particle_parameter values below to create your unique | ||
+ | // particle effect and click SAVE. Values are explained along with their | ||
+ | // min/max and default values further down in this script. | ||
+ | |||
+ | |||
+ | string | ||
+ | integer AUTO_START = TRUE; // Optionally FALSE only if using CONTROLLERS. | ||
+ | |||
+ | list particle_parameters=[]; | ||
+ | list target_parameters=[]; | ||
+ | |||
+ | default { | ||
+ | state_entry() { | ||
+ | particle_parameters = [ // start of particle settings | ||
+ | // Texture Parameters: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | // Production Parameters: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | // Placement Parameters: | ||
+ | | ||
+ | |||
+ | // Placement Parameters (for any non-DROP pattern): | ||
+ | | ||
+ | // PSYS_SRC_BURST_RADIUS, | ||
+ | | ||
+ | // Placement Parameters (only for ANGLE & CONE patterns): | ||
+ | | ||
+ | // PSYS_SRC_OMEGA, | ||
+ | | ||
+ | // After-Effect & Influence Parameters: | ||
+ | | ||
+ | // PSYS_SRC_TARGET_KEY, | ||
+ | | ||
+ | | ||
+ | | PSYS_PART_INTERP_COLOR_MASK | ||
+ | | PSYS_PART_INTERP_SCALE_MASK | ||
+ | | PSYS_PART_EMISSIVE_MASK | ||
+ | | PSYS_PART_FOLLOW_VELOCITY_MASK | ||
+ | // After-effect & Influence Options: | ||
+ | | PSYS_PART_WIND_MASK | ||
+ | | PSYS_PART_BOUNCE_MASK | ||
+ | // | PSYS_PART_FOLLOW_SRC_MASK | ||
+ | // | PSYS_PART_TARGET_POS_MASK | ||
+ | // | PSYS_PART_TARGET_LINEAR_MASK | ||
+ | ) | ||
+ | //end of particle settings | ||
+ | ]; | ||
+ | | ||
+ | if ( AUTO_START ) llParticleSystem( particle_parameters ); | ||
+ | | ||
+ | } | ||
+ | | ||
+ | link_message( integer sibling, integer num, string mesg, key target_key ) { | ||
+ | if ( mesg != CONTROLLER_ID ) { // this message isn't for me. Bail out. | ||
+ | return; | ||
+ | } else if ( num == 0 ) { // Message says to turn particles OFF: | ||
+ | llParticleSystem( [ ] ); | ||
+ | } else if ( num == 1 ) { // Message says to turn particles ON: | ||
+ | llParticleSystem( particle_parameters + target_parameters ); | ||
+ | } else if ( num == 2 ) { // Turn on, and remember and use the key sent us as a target: | ||
+ | target_parameters = [ PSYS_SRC_TARGET_KEY, | ||
+ | llParticleSystem( particle_parameters + target_parameters ); | ||
+ | } else { // bad instruction number | ||
+ | // do nothing. | ||
+ | } | ||
+ | } | ||
+ | | ||
+ | } | ||
+ | |||
+ | |||
+ | // | ||
+ | // There are 22-ish NAMED attributes that affect a particle display. | ||
+ | // To customize a display you give each a VALUE. | ||
+ | // For example: PSYS_PART_START_COLOR is a named attribute, | ||
+ | // and <1.0, 0.5, 0.0> is a color VALUE (orange, in this case). | ||
+ | // | ||
+ | // As long as your ' | ||
+ | // be in any order! | ||
+ | |||
+ | // | ||
+ | // | ||
+ | // TEXTURE, can be an "Asset UUID" key copied from a texture | ||
+ | // that you have full permissions to, or the name of | ||
+ | // a texture in the prim's inventory. | ||
+ | // | ||
+ | // SCALE, (size) 0.0 to 4.0 meters wide, by 0.0 to 4.0 meters tall. (default 1x1) | ||
+ | // Textures are FLAT, so the ' | ||
+ | // Values smaller than 0.04x0.04 may not get rendered at all. | ||
+ | // Tiny particles vanish if the viewer is not near them. | ||
+ | // | ||
+ | // BEGIN_SCALE sets particle start size. | ||
+ | // END_SCALE (end size) is ignored, if the INTERP_SCALE_MASK option is disabled. | ||
+ | // | ||
+ | // COLOR, < RED, GREEN, BLUE > from < | ||
+ | // ALPHA, 1.0 = 100% visible(default), | ||
+ | // START_COLOR and START_ALPHA set the color and transparency of newly created particles. | ||
+ | // END_COLOR and END_ALPHA are ignored, if the INTERP_COLOR_MASK option is disabled. | ||
+ | |||
+ | |||
+ | // | ||
+ | // | ||
+ | // BURST_PART_COUNT: | ||
+ | // | ||
+ | // BURST_RATE: seconds to delay between particle bursts. 0.0 to 30.0 (default 0.1) | ||
+ | // | ||
+ | // PART_MAX_AGE: | ||
+ | // | ||
+ | // | ||
+ | // The default total number of particles that can be seen is 4096, if one or more | ||
+ | // emitters try to create more than that, many will not be seen, and it may cause | ||
+ | // viewer lag. Use as few particles as you can for your effect: | ||
+ | // AGE/RATE * COUNT will tell you approximately how many particles your emitter creates. | ||
+ | // | ||
+ | // SRC_MAX_AGE: | ||
+ | |||
+ | |||
+ | // | ||
+ | // | ||
+ | // PATTERN: | ||
+ | // DROP, ignores all other placement settings. | ||
+ | // EXPLODE, spray particles in all directions | ||
+ | // ANGLE, sprays a flat " | ||
+ | // CONE, sprays " | ||
+ | // | ||
+ | // RADIUS: | ||
+ | // (RADIUS is disabled with DROP pattern and the FOLLOW_SRC & TARGET_LINEAR options) | ||
+ | // | ||
+ | // SPEED: 0.00 to 50.0? Sets min/max starting velocities for non-drop patterns. (default: 1.0) | ||
+ | // | ||
+ | // ANGLE_BEGIN & END: 0.00*PI (up) to 1.00*PI (down), | ||
+ | // | ||
+ | // | ||
+ | // OMEGA: < | ||
+ | // every burst. 0.0 to PI? (default: < | ||
+ | |||
+ | // | ||
+ | // | ||
+ | // ACCEL, x,y,z 0.0 to 50.0? sets a constant force, (affects all patterns) | ||
+ | // Causes particles to drift up/down or in a compass direction. | ||
+ | // Use ACCEL to create the illusion of (anti-)gravity or a directional wind. | ||
+ | // (ineffective with TARGET_LINEAR option) | ||
+ | // | ||
+ | // TARGET_KEY, | ||
+ | // " | ||
+ | // llGetOwner() | ||
+ | // llGetKey() target self | ||
+ | // llGetLinkKey(1) target parent prim | ||
+ | // llGetLinkKey(llGetLinkNum() + 1) target next prim in link set | ||
+ | // | ||
+ | // WARNING: New copies of objects get new keys, you can't simply paste | ||
+ | // a prim's key into your script and expect it to always work. Visit | ||
+ | // the Particle Laboratory' | ||
+ | // to dynamically find your target' | ||
+ | // depending on if your target is linked to your emitter or not. | ||
+ | |||
+ | |||
+ | // | ||
+ | // | ||
+ | // Each option may be ON/ENABLED (no leading // ) | ||
+ | // or OFF/ | ||
+ | // Options are combined together in a special way, (using the | symbol). | ||
+ | // This creates one single Parameter for PSYS_PART_FLAGS. | ||
+ | |||
+ | | ||
+ | // | ||
+ | // | ||
+ | // EMISSIVE: identical to "full bright" | ||
+ | // | ||
+ | // FOLLOW_VELOCITY: | ||
+ | // | ||
+ | // INTERP_COLOR: | ||
+ | // | ||
+ | // INTERP_SCALE: | ||
+ | |||
+ | |||
+ | // | ||
+ | // | ||
+ | // BOUNCE: | ||
+ | // | ||
+ | // WIND: the sim's wind will push particles around | ||
+ | // | ||
+ | // FOLLOW_SRC: makes particles move (but not rotate) if their emitter moves, (disables RADIUS) | ||
+ | // | ||
+ | // TARGET_POS: causes particles to arrive at a some target at end of of their lifespan. | ||
+ | // | ||
+ | // TARGET_LINEAR: | ||
+ | // and forces a DROP-like pattern and disables effects of WIND and ACCEL | ||
+ | |||
+ | |||
+ | |||
+ | // | ||
+ | // | ||
+ | // | ||
+ | // Want to control when your particles turn ON and OFF? You can! | ||
+ | // | ||
+ | // Drop one (or more) of the CONTROL TEMPLATES from the particle laboratory | ||
+ | // into your object containing this script. | ||
+ | |||
+ | // Your controls should be effective immediately. | ||
+ | // adjusted and tuned, open them and read the USAGE notes to see.) | ||
+ | // | ||
+ | // One control template can control several particle templates in the | ||
+ | // same object. | ||
+ | // particle effect active at a time). | ||
+ | // | ||
+ | // The ' | ||
+ | // and particle template to work. You can change that value and have | ||
+ | // a controller for one effect, and a different controller for a different | ||
+ | // effect in the same object. | ||
+ | // | ||
+ | |||
+ | |||
+ | // | ||
+ | </ | ||