Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Candle flame

Niles Todd
Registered User
Join date: 20 Jul 2006
Posts: 17
09-01-2006 21:14
Does anybody have or know where I can get a full permission candle flame that I can use in my work? I cant seem to find one anywhere. If anybody can halp I would be so grateful.
BamBam Sachertorte
floral engineer
Join date: 12 Jul 2005
Posts: 228
09-02-2006 21:49
Put this in a transparent prim:

CODE
// Particle System 1.0

StartSteam()
{
// MASK FLAGS: set to "TRUE" to enable
integer glow = TRUE; // Makes the particles glow
integer bounce = FALSE; // Make particles bounce on Z plane of objects
integer interpColor = TRUE; // Color - from start value to end value
integer interpSize = TRUE; // Size - from start value to end value
integer wind = FALSE; // Particles effected by wind
integer followSource = FALSE; // Particles follow the source
integer followVel = FALSE; // Particles turn to velocity direction



// Choose a pattern from the following:
// PSYS_SRC_PATTERN_EXPLODE
// PSYS_SRC_PATTERN_DROP
// PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
// PSYS_SRC_PATTERN_ANGLE_CONE
// PSYS_SRC_PATTERN_ANGLE
integer pattern = PSYS_SRC_PATTERN_ANGLE_CONE; // PSYS_SRC_PATTERN_EXPLODE;

// Select a target for particles to go towards
// "" for no target, "owner" will follow object owner
// and "self" will target this object
// or put the key of an object for particles to go to

key target = "";


// PARTICLE PARAMETERS

float age = 4; // Life of each particle
float maxSpeed = 0.02; // Max speed each particle is spit out at
float minSpeed = 0.04; // Min speed each particle is spit out at
string texture = ""; // Texture used for particles, default used if blank
float startAlpha = 0.8; // Start alpha (transparency) value
float endAlpha = 0; // End alpha (transparency) value
vector startColor = <1,1,0>; // Start color of particles <R,G,B>
vector endColor = <0.5,0,0>; // End color of particles <R,G,B> (if interpColor == TRUE)
vector startSize = <0.07,0.07, 0.0>; // Start size of particles
vector endSize = <0.015,0.07,0.0>; // End size of particles (if interpSize == TRUE)
vector push = <0.0,0.0,0.0>; // Force pushed on particles

// SYSTEM PARAMETERS

float rate = 0.1; // How fast (rate) to emit particles
float radius = 0.0; // Radius to emit particles for BURST pattern
integer count = 8; // How many particles to emit per BURST
float beginAngle = 0.0; // Outer angle for all ANGLE patterns PI/4
float endAngle = 20*DEG_TO_RAD; // Inner angle for all ANGLE patterns
vector omega = <0,0,0>; // Rotation of ANGLE patterns around the source
float life = 0; // Life in seconds for the system to make particles

// SCRIPT VARIABLES

integer flags;


flags = 0;

if (glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
if (bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
if (interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
if (interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
if (wind) flags = flags | PSYS_PART_WIND_MASK;
if (followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
if (followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
if (target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;

llParticleSystem([ PSYS_PART_MAX_AGE,age,
PSYS_PART_FLAGS,flags,
PSYS_PART_START_COLOR, startColor,
PSYS_PART_END_COLOR, endColor,
PSYS_PART_START_SCALE,startSize,
PSYS_PART_END_SCALE,endSize,
PSYS_SRC_PATTERN, pattern,
PSYS_SRC_BURST_RATE,rate,
PSYS_SRC_ACCEL, push,
PSYS_SRC_BURST_PART_COUNT,count,
PSYS_SRC_BURST_RADIUS,radius,
PSYS_SRC_BURST_SPEED_MIN,minSpeed,
PSYS_SRC_BURST_SPEED_MAX,maxSpeed,
PSYS_SRC_TARGET_KEY,target,
PSYS_SRC_ANGLE_BEGIN,beginAngle,
PSYS_SRC_ANGLE_END,endAngle,
PSYS_SRC_OMEGA, omega,
PSYS_SRC_MAX_AGE, life,
PSYS_SRC_TEXTURE, texture,
PSYS_PART_START_ALPHA, startAlpha,
PSYS_PART_END_ALPHA, endAlpha
]);

}
StartSpray ()
{

}

StopSpray()
{
llParticleSystem([]);
}



default
{
state_entry()
{
StartSteam();
}

listen(integer channel, string name, key id, string message)
{

if (0 == llSubStringIndex(message, "spray on"))
{
StartSteam();

}
else if (0 == llSubStringIndex(message, "spray off"))
{
StopSpray();
}
}
}

Niles Todd
Registered User
Join date: 20 Jul 2006
Posts: 17
09-03-2006 06:05
My god Bambam your a Ledgend! One day people will sing songs around camp fires about you! Thank you so much! Please let me know if you would like anything in return.
Shirley Marquez
Ethical SLut
Join date: 28 Oct 2005
Posts: 788
Another way to skin the flame cat...
09-03-2006 10:35
Another way to make a flame is with an animated texture. I teach a class on lighting where I give away the materials to make a candle with a flickering flame; for the convenience of forum readers, I have set out a copy of the class materials, including the flame texture and the texture animation script that makes it work, as well as a completed candle so you can see how it all goes together, at my home sales lot in Deneb. Buy the flaming box for L$0 to get it. (It's near the statues.)

The flame texture is not my own work; it was created by Eric Linden. I have seen the same flame texture in many other objects in SL, both free and not. Please don't sell the texture by itself for more than L$0, but selling objects containing the texture is fine.

The texture on the box itself is a modified version of the flame texture that I made myself, with the background changed to black instead of transparent. It is also included in the box; feel free to use it under the same terms as the original (i.e., don't sell it as a texture).
Xell Utu
Registered User
Join date: 3 Sep 2006
Posts: 3
09-03-2006 21:46
Could now, perhaps, we setup a gravity method? A way to point which direction the particles flow?
BamBam Sachertorte
floral engineer
Join date: 12 Jul 2005
Posts: 228
09-04-2006 10:58
The particles will flow around the z-axis of the prim. Tilt the prim to point the particles. You could also set the push vector to something other than zero, but you probably don't want the particles to accelerate.
Kiwi Alfa
Registered User
Join date: 19 Jul 2006
Posts: 9
09-05-2006 00:16
You might also be interested in setting the wind value to TRUE, so they're affected by wind, which will probably make it look more realistic.
1Storm Signals
Registered User
Join date: 1 Aug 2006
Posts: 4
Omg... I Love U People!
09-11-2006 22:35
Thanks to everyone in this thread for all this wonderful candle information...
Wish me luck!
Usagi Musashi
UM ™®
Join date: 24 Oct 2004
Posts: 6,083
10-29-2006 19:48
Thank thank thank!!!!!!!!!