Jump to content
Sunbleached

Particle systems: FIRE, SMOKE, RAIN

Recommended Posts

Hi! I want to share some particle systems:

FIRE

//* script_starts_here: FIRE SCRIPT ON/OFF TOUCH PUBLIC
//
integer run;
default
{
touch_start(integer total_number)
{
if(run)
{
run = FALSE;
llParticleSystem([]);
}
else
{
run = TRUE;
llParticleSystem([PSYS_PART_MAX_AGE,2.50,
PSYS_PART_FLAGS, 259,
PSYS_PART_START_COLOR, <0.18, 0.16, 0.13>,
PSYS_PART_END_COLOR, <0.59, 0.65, 0.62>,
PSYS_PART_START_SCALE,<0.15, 0.15, 0.00>,
PSYS_PART_END_SCALE,<0.77, 1.21, 0.00>,
PSYS_SRC_PATTERN, 2,
PSYS_SRC_BURST_RATE,0.00,
PSYS_SRC_BURST_PART_COUNT,4,
PSYS_SRC_BURST_RADIUS,0.00,
PSYS_SRC_BURST_SPEED_MIN,0.07,
PSYS_SRC_BURST_SPEED_MAX,0.35,
PSYS_SRC_ANGLE_BEGIN, 1.65,
PSYS_SRC_ANGLE_END, 0.00,
PSYS_SRC_MAX_AGE, 0.0,
PSYS_SRC_TEXTURE, "006d9758-81da-38a9-9be3-b6c941cae931",
PSYS_PART_START_ALPHA, 0.40,
PSYS_PART_END_ALPHA, 0.00,
PSYS_SRC_ACCEL, <0.00, 0.00, 1.14>]);
}
}
}
//* script_ends_here

SMOKE

//* script_starts_here: SMOKE
//
default
{
state_entry()
{
llParticleSystem([PSYS_PART_MAX_AGE,2.50,
PSYS_PART_FLAGS, 259,
PSYS_PART_START_COLOR, <0.18079, 0.16000, 0.13761>,
PSYS_PART_END_COLOR, <0.59811, 0.65541, 0.62564>,
PSYS_PART_START_SCALE,<0.15062, 0.15062, 0.00000>,
PSYS_PART_END_SCALE,<0.77423, 1.21800, 0.00000>,
PSYS_SRC_PATTERN, 2,
PSYS_SRC_BURST_RATE,0.00,
PSYS_SRC_BURST_PART_COUNT,4,
PSYS_SRC_BURST_RADIUS,0.00,
PSYS_SRC_BURST_SPEED_MIN,0.07,
PSYS_SRC_BURST_SPEED_MAX,0.35,
PSYS_SRC_ANGLE_BEGIN, 1.65,
PSYS_SRC_ANGLE_END, 0.00,
PSYS_SRC_MAX_AGE, 0.0,
PSYS_SRC_TEXTURE, "006d9758-81da-38a9-9be3-b6c941cae931",
PSYS_PART_START_ALPHA, 0.40,
PSYS_PART_END_ALPHA, 0.00,
PSYS_SRC_ACCEL, <0.00, 0.00, 1.14>]);
}
}
//* script_ends_here

RAIN

//* script_starts_here: RAIN / ON/OFF CHAT COMMAND Say : /10 start / stop
//
default
{
state_entry()
{
llListen(10,"","","");
}
listen(integer chan, string name, key id, string msg)
{
if(msg=="stop")
{
llParticleSystem([]);
}   
else if(msg=="start")
{
llParticleSystem([PSYS_PART_MAX_AGE,1.20,
PSYS_PART_FLAGS, 259,
PSYS_PART_START_COLOR, <0.73, 0.84, 0.79>,
PSYS_PART_END_COLOR, <0.61, 0.76, 0.82>,
PSYS_PART_START_SCALE,<0.10, 0.00, 0.00>,
PSYS_PART_END_SCALE,<0.10, 3.69, 0.00>,
PSYS_SRC_PATTERN, 8,
PSYS_SRC_BURST_RATE,0.10,
PSYS_SRC_BURST_PART_COUNT,25,
PSYS_SRC_BURST_RADIUS,5.57,
PSYS_SRC_BURST_SPEED_MIN,0.11,
PSYS_SRC_BURST_SPEED_MAX,0.64,
PSYS_SRC_ANGLE_BEGIN, 0.00,
PSYS_SRC_ANGLE_END, 0.78,
PSYS_SRC_MAX_AGE, 0.0,
PSYS_SRC_TEXTURE, "06675bc5-e9b9-0557-7179-fbf7779faed8",
PSYS_PART_START_ALPHA, 0.20,
PSYS_PART_END_ALPHA, 0.75,
PSYS_SRC_ACCEL, <-0.37, 0.45, -12.00>]);
}
}
}
//* script_ends_here

Have fun!

Share this post


Link to post
Share on other sites

Hi Sunbleached,

Your "Fire" and "Smoke" scripts use the same texture and similar start and end colors (grey). I imagine they'll both look like smoke. Wanna check that out?

They also use different invocation methods, Touch->Fire, Rez->Smoke, Message->Rain. That's not a problem, but might confuse newbies.

Scripting is fun, particularly with llParticleSystem(). My newest avatar is constructed using nothing but that call and one texture.

Edited by Madelaine McMasters
  • Like 1

Share this post


Link to post
Share on other sites
30 minutes ago, Madelaine McMasters said:

Hi Sunbleached,

Your "Fire" and "Smoke" scripts use the same texture and similar start and end colors (grey). I imagine they'll both look like smoke. Wanna check that out?

They also use different invocation methods, Touch->Fire, Rez->Smoke, Message->Rain. That's not a problem, but might confuse newbies.

Scripting is fun, particularly with llParticleSystem(). My newest avatar is constructed using nothing but that call and one texture.

Hi! 

I specifically made different options so that people could use it differently in these examples.
Thank you, I hope you enjoyed it!


It’s interesting to see your avatar from the particles!

Share this post


Link to post
Share on other sites
9 minutes ago, Sunbleached said:

It’s interesting to see your avatar from the particles!

There are two particle effects that only fire for a second or two every 10-20 minutes, but this gives you some idea what I look like.

  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...