Home |
Add a script
|
||
|---|---|---|---|
| Category: | Contributor: | Description | |
| Bling | CHandra Page | Bling 5 Seconds.lsl | |
Bling 5 Seconds.lsl
Bling 5 Seconds.lsl
Download this script - Please use this link to get this script. If you see all the code on one long line, please use Wordpad or another editor, such as LSLEdit.exe. The .LSL file you will download is an ordinary text file.
1 // CATEGORY:Bling 2 // DESCRIPTION:Bling 5 Seconds.lsl 3 // ARCHIVED BY:Ferd Frederix 4 5 // Diamond sparkly effect 6 // by Chandra Page 7 // 2004-12-06 8 9 // Based on Particle Script 0.5 10 // Created by Ama Omega 11 // 3-26-2004 12 13 // Mask Flags - set to TRUE to enable 21 22 // Choose a pattern from the following: 23 // PSYS_SRC_PATTERN_EXPLODE 24 // PSYS_SRC_PATTERN_DROP 25 // PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY 26 // PSYS_SRC_PATTERN_ANGLE_CONE 27 // PSYS_SRC_PATTERN_ANGLE 28 integer pattern = PSYS_SRC_PATTERN_EXPLODE; 29 30 // Select a target for particles to go towards 31 // "" for no target, "owner" will follow object owner 32 // and "self" will target this object 33 // or put the key of an object for particles to go to 34 key target = "self"; 35 36 // Particle paramaters 37 float age = 0.5; // Life of each particle 38 float maxSpeed = .1; // Max speed each particle is spit out at 39 float minSpeed = .1; // Min speed each particle is spit out at 40 string texture = ""; // Texture used for particles, default used if blank 41 float startAlpha = 1; // Start alpha (transparency) value 42 float endAlpha = 0.1; // End alpha (transparency) value 43 vector startColor = <1,1,1>; // Start color of particles <R,G,B> 45 vector startSize = <.3,.05,.3>; // Start size of particles 47 vector push = <0,0,0>; // Force pushed on particles 48 49 // System paramaters 50 float rate = 5.0; // How fast (rate) to emit particles 51 float radius = 0; // Radius to emit particles for BURST pattern 52 integer count = 3; // How many particles to emit per BURST 53 float outerAngle = 1.54; // Outer angle for all ANGLE patterns 54 float innerAngle = 1.55; // Inner angle for all ANGLE patterns 55 vector omega = <0,0,0>; // Rotation of ANGLE patterns around the source 56 float life = 0; // Life in seconds for the system to make particles 57 58 // Script variables 59 integer pre = 2; //Adjust the precision of the generated list. 60 61 integer flags; 62 list sys; 63 integer type; 64 vector tempVector; 65 rotation tempRot; 66 string tempString; 67 integer i; 68 69 particlesOn() 70 { 71 flags = 0; 72 if (target == "owner") target = llGetOwner(); 73 if (target == "self") target = llGetKey(); 74 if (glow) flags = flags | PSYS_PART_EMISSIVE_MASK; 75 if (bounce) flags = flags | PSYS_PART_BOUNCE_MASK; 76 if (interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK; 77 if (interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK; 78 if (wind) flags = flags | PSYS_PART_WIND_MASK; 79 if (followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK; 80 if (followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK; 81 if (target != "") flags = flags | PSYS_PART_TARGET_POS_MASK; 82 sys = [ PSYS_PART_MAX_AGE,age, 83 PSYS_PART_FLAGS,flags, 84 PSYS_PART_START_COLOR, startColor, 85 PSYS_PART_END_COLOR, endColor, 86 PSYS_PART_START_SCALE,startSize, 87 PSYS_PART_END_SCALE,endSize, 88 PSYS_SRC_PATTERN, pattern, 89 PSYS_SRC_BURST_RATE,rate, 90 PSYS_SRC_ACCEL, push, 91 PSYS_SRC_BURST_PART_COUNT,count, 92 PSYS_SRC_BURST_RADIUS,radius, 93 PSYS_SRC_BURST_SPEED_MIN,minSpeed, 94 PSYS_SRC_BURST_SPEED_MAX,maxSpeed, 95 PSYS_SRC_TARGET_KEY,target, 96 PSYS_SRC_INNERANGLE,innerAngle, 97 PSYS_SRC_OUTERANGLE,outerAngle, 98 PSYS_SRC_OMEGA, omega, 99 PSYS_SRC_MAX_AGE, life,100 PSYS_SRC_TEXTURE, texture,101 PSYS_PART_START_ALPHA, startAlpha,102 PSYS_PART_END_ALPHA, endAlpha103 ];104 105 llParticleSystem(sys);106 }107 108 particlesOff()109 {110 llParticleSystem([]);111 }112 113 default114 {115 state_entry()116 {117 particlesOn();118 }119 121 {122 if (str == "on")123 {124 particlesOn();125 }126 127 if (str == "off")128 {129 particlesOff();130 }131 }132 }133 // END //