Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Can't turn off a particle system

Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
10-30-2005 17:17
I have a particle system that I want to turn on/off. I have the link message sending out a value of 1 when it's on and 0 when it's off. I've tested out my scripts so that I know that the link_message is transmitting properly, but the particle effect system doesn't seem to be set up right to turn off. I'm using the "eltee Statosky Particle Creation Engine 1.2" for my particles, so I'm just going to copy the relevant part of the template (the on/off code namely)
CODE

default
{
state_entry()
{
}
link_message( integer sender, integer num, string message, key id )
{
if( num == 0 )
{
running=TRUE;
llSetText(" ", <0.0, 1.0, 0.0>, 0.5);
ParticleFallsEffect();
}

else
{
running=FALSE;
llSetText(" ", <0.0, 1.0, 0.0>, 0.5);
ParticleFallsEffect();
}

}
Beclamide Neurocam
3.14159265
Join date: 8 Oct 2005
Posts: 70
10-30-2005 17:45
You need to run the particle function again without any parameters. Just the empty function should do
Beclamide Neurocam
3.14159265
Join date: 8 Oct 2005
Posts: 70
10-30-2005 17:46
Here's a snip from the lsl wiki

default {
state_entry()
{
llParticleSystem([]);
}
}
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
10-30-2005 22:04
thanks for the help. it works, but I ran into a bug of somekind. sometimes (about 1 out of 4 tries) the effect doesn't turn off, or 3 of the 4 childprims that use the script will turn off but a 4th one (always random which one) doesn't. any ideas? do I have to write a different unique script for each particle effect and call each script uniquely? I don't know how to do that yet aside from calling a different integer out 4 times, and having each system listen for their unique integer.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
10-31-2005 00:18
No, you should be ok without writing unique scripts for each one.

I'm noticing since 1.7 that listens are dodgy for no obvious reason, at least in some sims (I've not tested it that widely), and it appears from other lists here that other people are finding similar things. I suspect, sadly, you're finding the same thing too.