Sunday, November 2, 2014

Script: Fireplaces - Particles Edition

[Black Tulip] Fireplaces - Particles Edition (Script for Designers)

(c) 2013 Auryn Beorn

Fireplaces - Particles Edition script in Marketplace.

Thank you for having considered this script to enhance the quality of your products. Please read the following instructions carefully, especially the ones explaining which permissions to apply to the scripts for the next owner. Failure to complete this task INVALIDATES the license governing your use of this set of scripts. Should you have problems, please fill the scripts assistance form, explaining what you did and what happened, and I'll get back to you.

The script contains a check to prevent accidental give-aways. If you haven't set permissions correctly in your inventory, then the script will self delete when you try to use it. The best way to ensure you set permissions correctly is by doing it NOW in your inventory.



  • Start/Stop at the same time:
    • Particle flames and smoke
    • Sound
    • Light (SL light point)
  • Start/Stop independently the effects listed above when the global effect is ON
  • Change the light color, radius, intensity and fall off of this SL-light point.
  • Change the sound volume.
  • Menu timeout to reduce lag - no open listeners after timeout (0.001 ms script time when idle)
  • Final user can change access to owner only/everybody/group
  • Menu can be integrated into tools such as MLPv2, AVsitter... (AVsitter version 2 works too!)

NOTE: It is NOT mandatory to add a sound. The included sample sound is the well known Crackling Fire from Philip Linden, which you can use if you wish in your builds.


There are two scripts contained in your folder:

[Black Tulip] Fireplaces - Particles Edition
[Black Tulip] Fireplaces - Particles Edition [MODULE]

We need to use ONLY ONE of them in a given product.

Which one? How to choose?

The [MODULE] version, as explained in the THE MAIN SCRIPT, AS A MODULE YOU CAN USE FROM ANOTHER SCRIPT section, will allow you to use this script integrated with other scripts that allow sending linked messages, such as the Multi Love Pose (MLP) or AVSitter for multiavatar, multianimation devices.

So, depending on what we need, we'll use the following script as main one:

Normal use - We want the menu to show when the object is clicked:
[Black Tulip] Fireplaces - Particles Edition

The menu should show up after clicking a button from another script, like MLP, AVSitter:
[Black Tulip] Fireplaces - Particles Edition [MODULE]

Once we've chosen the right main script, we have to set some descriptions in the primitives of the object, following the instructions below, and modify the parameters in the configuration notecard.

This configuration notecard is named "[Black Tulip] Fireplaces - Particles Edition ~config~"
Embedded in the documentation notecard, you have a copy. Keep it in a safe place, should you need a fresh copy at any time.


Check the following section on this page, knowing that each [Black Tulip] ASSET refers to the following scripts:

[Black Tulip] Fireplaces - Particles Edition
[Black Tulip] Fireplaces - Particles Edition [MODULE]


With this script, you may control the following:

  • One light point
  • Up to two particle effects (for example, sparks and smoke, particle flames and smoke, only sparks, only smoke...)

We'll understand better what this means by examining the [Black Tulip] Fireplaces Particles Edition SAMPLE object. Rez it, and let's follow this explanation.

First of all, click it to get the menu. You'll see, as soon as you select ON/OFF to start all the effects, that the sound is on (if the selected volume isn't Off, of course :-) ), the particles emit, and the SL light emits. But there it is only one prim that will be the SL light point.

How is this done? Let's examine the object. Right click the sample object to edit it, then click the "Content" tab. When we do this, we're inspecting the contents of the ROOT PRIM. You should see:

  • The [Black Tulip] Fireplaces - Particles Edition script
  • The [Black Tulip] Fireplaces - Particles Edition ~config~ configuration notecard
  • The well known sample sound called Crackling Fire

What does this mean?
That the script, the configuration notecard and the soundclip, if any, have to be dropped into the ROOT PRIM. This is the default when we simply right click an object, then select "Edit" from the menu.

Having this clear, now let's examine the sample object in detail. It consists of two linked prims: Sculpt logs and a transparent SL-box that makes its role as extra particles emitter. Right click to edit, click "Edit linked", and now:

  • Inspect the sculpted logs prim. From it, smoke particles are emitted, and this is the SL-light point.
  • Inspect now the description of this prim. It says:


  • This means, this prim is a particles smoke emitter, and the SL-light point. Later we go in more detail about how the description is built exactly.
  • Inspect now the transparent box. Inspect the description. It says:


  • This means that this prim will emit particle flames.

Now that we've inspected the object, let's study the details of the descriptions format.


To tell the script which of the linked primitives are relevant (particle effects, animated texture effects or SL-light point), we have to write specific words (CASE SENSITIVE) in the DESCRIPTION of each primitive (DESCRIPTION - not the name, don't confuse them!)

The format of the descriptions is as follows:




It doesn't matter the order the parameters are written, as long as a # character separates them.

As we've seen, when inspecting the sample object, the following parameter-keyword would indicate that the prim is a SL-light point:


There are two other possibilities (explained below): flame and smoke.

If we want a primitive having, for example, particles flames, and being at the same time a SL light point, then we write the:


combination. The # character will separate parameters, and it does not matter the order we choose to write the parameters.



would have the same effect.

The possible descriptions this script recognizes are:

Expected description for a light point: light
Expected description for particle effect #1: flame
Expected description for particle effect #2: smoke

Set the DESCRIPTIONS according to these simple rules, drop the main script and the configuration notecard in your linked object, and your object is ready to go!


The configuration notecard is named [Black Tulip] Fireplaces - Full Edition ~config~, and it allows us to:


Check the following section on this page, knowing that:

[Black Tulip] ***Script Name*** [MODULE] refers to [Black Tulip] Fireplaces - Particles Edition [MODULE]
CODE_NUMBER is -18640987
NAME_ON_MENU is Fireplace

AVSitter line looks like: BUTTON Fireplace|-18640987
MLP line looks like: LINKMSG Fireplace | 1,-4,-18640987,fromMLP

You have example AVpos and .MENUITEMS notecards with your purchase. Remember that this works too with AVSitter 2.


Q: I click the light/particle options on the menu, but no visible outcome shows. What's going wrong?

A: Most likely, there's not a light source/particles source defined in the object. Double-check the DESCRIPTION of the prim you expect to be a SL light point/particles source/animated texture.

Q: I hear no sound when I change the volume from the menu. What could be going wrong?

A: Make sure that there's a sound clip on the Content tab of the prim with the script.

For any other problem not described here, please give a complete description of your issue in the following online form.

I'll get back to you after I have read your report and replicated your issue inworld, according to your description of it. Please, be detailed.

-- Auryn Beorn