- Home /
Question by
orenspiralgalaxy · Oct 24, 2012 at 07:49 PM ·
animationparticles
Particle playing on all animations instead of specified one.
Hi all, I have a script here that is attached to a model with an animation that is split up into 8 clips. One of the animation clips is called "greenlaser1", and a particle effect is supposed to activate whenever "greenlaser1" is playing. However it is also doing the particle effect with a different animation clip called "jetpack1". Any ideas on how to fix this?
var greenoff3 : GameObject;
var greenlaser2 : ParticleSystem;
function Update () {
//test1 = animation["Robot_Animation"];
if (animation["greenlaser1"].isPlaying == true)
print("greenlaser");
AddStuff();
}
function AddStuff () {
greenoff3.active = true;
greenlaser2.enableEmission = true;
yield WaitForSeconds (4.5);
greenoff3.active = false;
animation.Stop("greenlaser1");
}
Comment
Your answer
Follow this Question
Related Questions
Partical System is not visible 1 Answer
Particle rotation 1 Answer
How can I play an explosion animation? 3 Answers
Smoke Particle Continuous Not Flowing 0 Answers
How do I make a particle emitter emit when a key is pressed? 1 Answer