Encog's Particle Machine | Heaton Research

Encog's Particle Machine


Particles are a special 2D effect that can be created in Second Life. The particle machine allows you to specify particle effects and see them created in the Second Life world. If you are not logged into Second Life, this page is of little use. However, if you are logged in you can quickly see how the different parameters create different particle effects. You can see the particle effect machine inside of the Second Life world at the following location http://slurl.com/secondlife/Encogia/187/196/22.
Encog's Second Life Particle Machine
Identify
To use the particle emitter you must be standing near it in Second Life. Enter your avatar name, exactly as it appears in Second Life.
This avatar must be near the particle emitter, or the particle emitter will not be activated.
Particle Pattern Shape - PSYS_SRC_PATTERN
Choose one of the following to define the pattern shape of the particle field.
Flags - PSYS_PART_FLAGS
The following flags define how the particle effect will look. Choose none or many.
Burst
Particles come in bursts. These fields allow you to define these bursts.
PSYS_SRC_BURST_RATE - How many seconds between bursts.
PSYS_SRC_BURST_PART_COUNT - How many particles in each burst.
PSYS_SRC_BURST_RADIUS - How far should the particles start out from the emitter.
PSYS_SRC_BURST_SPEED_MIN - Minimum speed for particles.
PSYS_SRC_BURST_SPEED_MAX - Maximum speed for particles.
Particle Properties
There are several properties you can set for the actual particles.
PSYS_SRC_TEXTURE - UUID of the desired particle texture, or leave blank.
PSYS_PART_MAX_AGE - Maximum time to live for a particle.
PSYS_PART_START_ALPHA - Starting alpha(transparency) for the particles. 1.0 is opague, 0.0 is invisable.
PSYS_PART_END_ALPHA - Ending alpha(transparency) for the particles. 1.0 is opague, 0.0 is invisable.
PSYS_SRC_ANGLE_BEGIN - Specifies a starting angle (degrees) for the angular cone types.
PSYS_SRC_ANGLE_END - Specifies an ending angle (degrees) for the angular types.
Particle Start Size Vector
This vector defines the starting x, y and z sizes of the particles. (PSYS_PART_START_SCALE)
Particle End Size Vector
This vector defines the ending x, y and z sizes of the particles. (PSYS_PART_END_SCALE)
Particle Acceleration
This vector defines the x, y and z acceleration of the particles. (PSYS_SRC_ACCEL)
Starting Color
This vector defines the red, green and blue color that the particles start at. Values between 0 and 1. (PSYS_PART_START_COLOR)
Ending Color
This vector defines the red, green and blue color that the particles end at. Values between 0 and 1. (PSYS_PART_END_COLOR)
Omega
The omega specifies the rotation spin on each particle. (PSYS_SRC_OMEGA)
generalParticleEmitterOn()
{
llParticleSystem([
PSYS_PART_FLAGS , 0
|PSYS_PART_WIND_MASK
|PSYS_PART_INTERP_COLOR_MASK
|PSYS_PART_INTERP_SCALE_MASK
|PSYS_PART_FOLLOW_SRC_MASK
|PSYS_PART_FOLLOW_VELOCITY_MASK
|PSYS_PART_EMISSIVE_MASK
,PSYS_SRC_PATTERN,PSYS_SRC_PATTERN_ANGLE_CONE
,PSYS_SRC_TEXTURE,""
,PSYS_SRC_MAX_AGE,0.0
,PSYS_PART_MAX_AGE,(float)4.0
,PSYS_SRC_BURST_RATE,(float)0.5
,PSYS_SRC_BURST_PART_COUNT,6
,PSYS_SRC_BURST_RADIUS,(float)10
,PSYS_SRC_BURST_SPEED_MIN,(float)0.4
,PSYS_SRC_BURST_SPEED_MAX,(float)0.5
,PSYS_SRC_ACCEL,<0,0,1>
,PSYS_PART_START_COLOR,<1,0,0>
,PSYS_PART_END_COLOR,<1,0,0>
,PSYS_PART_START_ALPHA,(float)1
,PSYS_PART_END_ALPHA,(float)1
,PSYS_PART_START_SCALE,<0.25,0.25,0.25>
,PSYS_PART_END_SCALE,<1.5,1.5,1.5>
,PSYS_SRC_ANGLE_BEGIN,0 * DEG_TO_RAD
,PSYS_SRC_ANGLE_END,360 * DEG_TO_RAD
,PSYS_SRC_OMEGA,<0,0,0>
]);
}

generalParticleEmitterOff()
{
llParticleSystem([]);
}

default
{
state_entry()
{
generalParticleEmitterOn();
}

touch_start( integer num )
{
state off;
}
}

state off
{
state_entry()
{
generalParticleEmitterOff();
}

touch_start( integer num )
{
state default;
}
}
Copyright 2005-2008 by Heaton Research, Inc.