Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Corrupted scripts / 'wild' event prims?

Yina Yao
Registered User
Join date: 14 Jan 2008
Posts: 3
02-18-2008 03:37
Hihi,


lately I keep getting bugged by 'wild event' prims, and while this is not a
bug report, I'm simply looking for ways to FIX the issue without unlinking,
recycling and redoing the prim affected, and all scripts it contained.

What IS a 'wild event' prim? The following has been observed with both
particle effects and sounds. You have a script in your prim that plays a
sound or starts a particle engine that stops after a moment, and sometimes
the prim gets corrupted, playing that sound or particle engine each time
you touch, sit on, move, walk into, or even just select or unselect the prim
for editing. Any action triggers the particle engine or sound effect, even if
the script itself does not even contain events for those. And to make it
more annoying, you can remove the script, and those 'rogue events' will
STILL trigger! And I've found no way so far to fix it, but delete the prim and
redo it.

So...anyone else affected, and knows a working remedy? Because it's breaking
some of my projects faster than I can finish them. o,O

Greetings,
-Yina
Roofus Kit
Registered User
Join date: 12 Dec 2006
Posts: 10
02-18-2008 04:46
I have the same problem now and again, only way I've found is like you said, to delete the prim entirely. But I do salvage contents, and the only prim you have to delete is the parent prim. Best thing is to make a copy of an object before tainting it with a script.
Yina Yao
Registered User
Join date: 14 Jan 2008
Posts: 3
02-18-2008 05:43
Well, with particle engines, the workaround is easy. Calling llParticleEngine([]);
does NOT fix the bug, but making a particle system you call at the end of any
other time-limited particle system, and which renders only one or two full-
transparent particles before being turned off will do the trick. The bug still
triggers the last active particle system, but since that last system now is
invisible, nobody notices. The problem is sounds here. Playing an empty/
silent sound at the end of each other sound effect doesn't seem to work.

-Yina
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
02-18-2008 06:01
With particle systems, the problem is most often encountered when PSYS_SRC_MAX_AGE = a non-zero value

This is a known issue.

The usual workaround is to use a timer or llSleep() to clear the particle system immediately after the emission. That is, for example, if PSYS_SRC_MAX_AGE = 10.00, set a ten second timer to call llParticleSystem([]) immediately after the particles have been emitted

EG:

ParticleStart()
{
llParticleSytem([...
PSYS_SRC_MAX_AGE, 10.00,
....
]);

llSetTimerEvent(10.00);
}


default
{
state_entry()
{
ParticleStart();
}

timer()
{
llParticleSystem([]);
}
}

see http://wiki.secondlife.com/wiki/LlParticleSystem Caveat number 2 for more information.