|
Eben Slade
If the wind stops, row!
Join date: 17 May 2007
Posts: 146
|
06-09-2007 13:44
Let's say I want to make a prim that leaves a particle trail when it is in motion, but shows no particles when it is still - a glow stick and its afterglow, or a starship and its "warp signature." Is there a way to do that?
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
06-09-2007 14:00
Sure. Use moving_start() and moving_end() events.
|
|
Eben Slade
If the wind stops, row!
Join date: 17 May 2007
Posts: 146
|
06-09-2007 14:03
From: Qie Niangao Sure. Use moving_start() and moving_end() events. Awesome! I'll give that a try. One other question: If I use ||frand to change the color of a prim is there a way to link that color into a particle script in that same prim? (i.e., the prim box goes from blue to red to green, and the particle attached to it also goes from blue to red to green at the same time.)
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
06-09-2007 16:32
Yep, you'll need to call llParticleSystem() each time to change colors, either setting PSYS_PART_START_COLOR and PSYS_PART_END_COLOR to the same value you're setting the prim, with PSYS_PART_INTERP_COLOR_MASK set FALSE, or possibly the _START_ to the new prim color and the _END_ to the *next* color for the prim, with _INTERP_ TRUE, with each particle shifting color gradually over its PSYS_PART_MAX_AGE.
Note that although the particle effect itself is client-side and doesn't contribute to server lag, each call to llParticleSystem() executes on the server, so moderation is a virtue.
|