# Particle Trail

how can i make a fire ball that when it blows up the smoke trail stays. like if i shot a missile and the missile blows up the smoke just dissapears. i’d try detatching it from the projectile but then it’ll just keep emitting.

On the particle system first enable autodestruct. Then when the fireball collides turn off the variable emit on the particle system, and the particles should fade out.

Here is one of my bullet scripts that does this:

``````var speed = 0.00;
var gravity = 0.00;
var randomMovement = 0.00;
var maxRandomVelocity = 0.00;

private var randMove : Vector3;
private var velocity : Vector3;
private var time = 0.00;

function Start ()
{
velocity = transform.forward * speed;
}

function Update ()
{
randMove += Random.insideUnitSphere * randomMovement * Time.deltaTime;
if(randMove.magnitude > maxRandomVelocity) randMove = randMove.normalized * maxRandomVelocity;
velocity.y -= gravity * Time.deltaTime;
velocity += randMove * Time.deltaTime;
transform.position += velocity * Time.deltaTime;
transform.rotation = Quaternion.LookRotation(velocity);

time += Time.deltaTime;
}

function ColdDetonate ()
{
DealWithTrailsRecurse(gameObject);
Destroy(gameObject);
}

function HotDetonate ()
{
DealWithTrailsRecurse(gameObject);
Destroy(gameObject);
}

function DealWithTrailsRecurse (object : GameObject)
{
particleAnimator = object.GetComponent(ParticleAnimator);
if(particleAnimator  particleAnimator.autodestruct)
{
object.particleEmitter.emit = false;
object.transform.parent = null;
}

timeTrail = object.GetComponent(TimeTrail);
if(timeTrail  timeTrail.autoDestruct)
{
timeTrail.emit = false;
object.transform.parent = null;
}

trail = object.GetComponent(TrailRenderer);
if(trail)
{
object.transform.parent = null;
}

meshRenderer = object.GetComponent(MeshRenderer);
if(meshRenderer)
{
meshRenderer.enabled = false;
}

for(var child : Transform in object.transform)
{
DealWithTrailsRecurse(child.gameObject);
}
}
``````

i get unknown identifyer with timeTrail

Here’s a smaller sample:

``````function OnCollisionEnter () {
var emitter : ParticleEmitter = GetComponentInChildren (ParticleEmitter);
emitter.transform.parent = null;
emitter.emit = false;
Destroy (gameObject);
}
``````

Be sure to enable autodestruct on the smoke trail, so it destroys itself when there are no more particles left.

How do i make black smoke?

Use the shader “Particles/Alpha Blended Premultiply”. And the texture you use has to have an alpha.

how do i get alphas?

I should have mentioned this before. Take a look at my particle effects tutorial:

http://yogware.bluegillstudios.com/site/tutorials/particle.html

and how do i make water splash??

Theres a nice waterfall in the Nature Demo project that will get you started.

“How do I make water splash” is a question that is answered artistically, as in
“How ever you want”

Theres no set rules. Eric had a nice Splash demo, Garens waterfall in nature demo is cool, Antenna tree has something splashy looking-try searching the forums for splash and water.

Its a 3d world, you can do whatever you want
AC

As starting points I would recommend a light blue texture w/ splashy alpha rendered as Alpha Blended on a splashy particle system. You can also create a flat plane with a shaped splash texture on it and animate it for a “tower” of water or some such. Try different things and you might come up with a good one after a while.

will this smoke trick work on Adobe Photoshop CS3?

Probably. If there seems to be a large difference in how my tutorial says it and how CS3 works, you can contact me by email, pm or aim and I can help you with it and get the tutorial fixed.