Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Particles Heart_shower_when_two_people_are_near  

Heart_shower_when_two_people_are_near

Creates hearts when two people are near the prim.

Category: Particles
By : Ferd Frederix
Created: 2011-10-15 Edited: 2011-10-15
Worlds: Second Life

the Zip file

Download all files for Heart_shower_when_two_people_are_near
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Heart_shower_when_two_people_are_near_1.lsl

This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1 // Created by Ama Omega 3-7-2004
2 // Updated by Jopsy Pendragon 5-11-2004
3 // sensor for 2 people added by Ferd Frederix 10-15-2011
4
5
6 // SECTION ONE: APPEARANCE -- These settings affect how each particle LOOKS.
7 integer glow = TRUE; // TRUE or FALSE(*)
8 vector startColor = <1,0,0>; // RGB color, black<0,0,0> to white<1,1,1>(*)
9 vector endColor = <1,0,0>; //
10 float startAlpha = 1.0; // 0.0 to 1.0(*), lower = more transparent
11 float endAlpha = 1.0; //
12 vector startSize = <0.1,0.1,0>; // <0.04,0.04,0>(min) to <10,10,0>(max>, <1,1,0>(*)
13 vector endSize = <0.1,0.1,0>; // (Z part of vector is discarded)
14 key texture = "419c3949-3f56-6115-5f1c-1f3aa85a4606"; // Texture used for particles. Texture must be in prim's inventory.
15
16 // SECTION TWO: FLOW -- These settings affect how Many, how Quickly, and for how Long particles are created.
17 // Note,
18 integer count = 5; // Number of particles created per burst, 1(*) to 4096
19 float rate = 0.1; // Delay between bursts of new particles, 0.0 to 60, 0.1(*)
20 float age = 3.0; // How long each particle lives, 0.1 to 60, 10.0(*)
21 float life = 0.0; // When to stop creating new particles. never stops if 0.0(*)
22
23 // SECTION THREE: PLACEMENT -- Where are new particles created, and what direction are they facing?
24 float radius = .30; // 0.0(default) to 64? Distance from Emitter where new particles are created.
25 float innerAngle = 0.75; // "spread", for all ANGLE patterns, 0(default) to PI
26 float outerAngle = 0.0; // "tilt", for ANGLE patterns, 0(default) to TWO_PI, can use PI_BY_TWO or PI as well.
27 integer pattern = PSYS_SRC_PATTERN_ANGLE_CONE; // Choose one of the following:
28 // PSYS_SRC_PATTERN_EXPLODE (sends particles in all directions)
29 // PSYS_SRC_PATTERN_DROP (ignores minSpeed and maxSpeed. Don't bother with count>1 )
30 // PSYS_SRC_PATTERN_ANGLE_CONE (set innerangle/outerange to make rings/cones of particles)
31 // PSYS_SRC_PATTERN_ANGLE (set innerangle/outerangle to make flat fanshapes of particles)
32 vector omega = <0,0,0>; // How much to rotate the emitter around the <X,Y,Z> axises. <0,0,0>(*)
33 // Warning, there's no way to RESET the emitter direction once you use Omega!!
34 // You must attach the script to a new prim to clear the effect of omega.
35
36 // SECTION FOUR: MOVEMENT -- How do the particles move once they're created?
37 integer followSource = FALSE; // TRUE or FALSE(*), Particles move as the emitter moves, (TRUE disables radius!)
38 integer followVel = FALSE; // TRUE or FALSE(*), Particles rotate towards their direction
39 integer wind = FALSE; // TRUE or FALSE(*), Particles get blown away by wind in the sim
40 integer bounce = FALSE; // TRUE or FALSE(*), Make particles bounce on Z altitude of emitter
41 float minSpeed = 1.3; // 0.01 to ? Min speed each particle is spit out at, 1.0(*)
42 float maxSpeed = 1.5; // 0.01 to ? Max speed each particle is spit out at, 1.0(*)
43 vector push = <0,0,-0.6>; // Continuous force pushed on particles, use small settings for long lived particles
44 key target = ""; // Select a target for particles to arrive at when they die
45 // can be "self" (emitter), "owner" (you), "" or any prim/persons KEY.
46
47 // Script variables
48
49 integer flags;
50 list sys;
51
52 updateParticles()
53 {
54 flags = 0;
55 if(target == "owner") target = llGetOwner();
56 if(target == "self") target = llGetKey();
57 if(glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
58 if(bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
59 if(startColor != endColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
60 if(startSize != endSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
61 if(wind) flags = flags | PSYS_PART_WIND_MASK;
62 if(followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
63 if(followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
64 if(target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
65 sys = [ PSYS_PART_MAX_AGE,age,
66 PSYS_PART_FLAGS,flags,
67 PSYS_PART_START_COLOR, startColor,
68 PSYS_PART_END_COLOR, endColor,
69 PSYS_PART_START_SCALE,startSize,
70 PSYS_PART_END_SCALE,endSize,
71 PSYS_SRC_PATTERN, pattern,
73 PSYS_SRC_ACCEL, push,
79 PSYS_SRC_INNERANGLE,innerAngle,
80 PSYS_SRC_OUTERANGLE,outerAngle,
81 PSYS_SRC_OMEGA, omega,
82 PSYS_SRC_MAX_AGE, life,
83 PSYS_SRC_TEXTURE, texture,
84 PSYS_PART_START_ALPHA, startAlpha,
85 PSYS_PART_END_ALPHA, endAlpha
86 ];
87 float newrate = rate;
88 if(newrate == 0.0) newrate=.01;
89 if( (age/rate)*count < 4096) llParticleSystem(sys);
90 else {
91 llInstantMessage(llGetOwner(),"Your particle system creates too many concurrent particles.");
92 llInstantMessage(llGetOwner(),"Reduce count or age, or increase rate.");
93 llParticleSystem( [ ] );
94 }
95 }
96
97
98 integer switch=0;
99 key name;
100
101 default
102 {
104 {
105 llWhisper(0,"touch prim to activate or deactivate");
106 name = llGetOwner();
107 }
108
109 touch_start(integer total_number)
110 {
111 if(switch==0)
112 {
113 switch=1;
114 llSensorRepeat("","",AGENT,20.0,PI,10.0);
115 llWhisper(0,"Hearts on");
116 }
117 else if(switch==1)
118 {
119 switch=0;
121 llWhisper(0,"Hearts off");
122 llParticleSystem( [ ] );
123 }
124 }
125
126 sensor(integer total_number)
127 {
128 if(total_number > 1 )
129 updateParticles(); // 2 or more causes this \
130 }
131
132
133 no_sensor()
134 {
135 llParticleSystem( [ ] );
136 }
137
138
139 }

Back to the Best Free Tools in Second Life and OpenSim.