Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Emit one particle?

Casey Seifert
No faith in humanity
Join date: 7 Nov 2005
Posts: 50
03-05-2008 09:43
Hello~


Trying to make something when triggered, set loose 1 and only 1 particle at the moment of trigger.

I've tried things like:

PSYS_SRC_MAX_AGE, 2.0,
PSYS_SRC_BURST_RATE,1.1,
PSYS_SRC_BURST_PART_COUNT,1,

Which SHOULD as I see it, give me one particle after 1.1 seconds, then stop the emitter after 2.0 seconds. I have played around with these settings, making one larger, one smaller etc...


I've also tried using a llSetTimerEvent();/llSleep(); technique with llResetScript();/llParticleSystem([]); in the timer() state, but I keep getting the same unpredictable results.


Sometimes the particle rezes on trigger sometimes they don't, it's often a 50/50 gamble. I have tried things like llResetTime(); thinking that the parameters inside the llParticleSystem([]); function maybe reliant on the script timer. But that didn't work either.


I'm in an area with no other particle emitters, and I can view up to a max of 4096 particles.


Anyone with any suggestions?
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
Unpredictable is my middle name...
03-05-2008 09:55
Perhaps the issue is that the script causes a message to be sent to all the clients that are in the area, including yours. Only when the message arrives safely does the action occur. This is becuase particles are generated on the viewer, not on the server, I think.

Therefore, it is hard to predict what you will see with any accuracy, and further more, different people might (will) see something different.

Maybe instead of one particle, you should temp-rez one object, though that would still be susceptible to various indeterministic behavior.
_____________________
So many monkeys, so little Shakespeare.
Casey Seifert
No faith in humanity
Join date: 7 Nov 2005
Posts: 50
03-05-2008 10:07
When I make it 1 particle a second without an emitter age, the intervals between each particle grow from about 0.5 to as much as 6 seconds.

My computer is pretty quick, I have everything on the highest possible detail and get about 40 - 60 FPS in populated areas, walking, rezzing, talking on main chat is virtually instantaneous... So It doesn't make sense that something as extremely simple as a particle emitter would become so utterly unpredictable/unstable. =<
Beverly Ultsch
Registered User
Join date: 6 Sep 2007
Posts: 229
03-05-2008 17:11
I may be wrong here but i think PSYS_SRC_BURST_RATE is the interval between particles not a dely to the first one.

So with the settings you have, at 0 seconds a partile is emitted, 1.1 seconds later a second partile is emmited, then at two second it stops, i would excpect to see two particles.

You may be better posting this in the scripting tips forum, there is a lot of particle expertise there.
Casey Seifert
No faith in humanity
Join date: 7 Nov 2005
Posts: 50
03-07-2008 09:05
From: Beverly Ultsch
So with the settings you have, at 0 seconds a partile is emitted, 1.1 seconds later a second partile is emmited, then at two second it stops, i would excpect to see two particles.


I would expect that, but all I get is 1 particle, or none at all.

I've put one same script into many objects, and had them triggered all through a llMessageLinked();. When triggered, some will emit a particle others won't and the result is different every try.



I've given up on building something that's related to this now anyway, seems that the llParticleSystem([]); is just far too unpredictable when needing more precise results.
Kahiro Watanabe
Registered User
Join date: 28 Sep 2007
Posts: 572
03-07-2008 10:25
If you are using timer() you have to know that it is not acurrate llSetTimerEvent(1.0) can be 1.1, 1.2, aprox.

This is because all scripts in a sim share their time with the server to execute each of their instructions, therefore is not guaranteed that llSetTimerEvent(1.0) will be exactly 1 second.

If you add that some lag can be generated with linked messages, and that lag can be different each time... seems kinda hard to have that acurracy that you are looking for.