My CrossFade script have no effects

I maked three animations like idle, run and Fire.
I used them by CrossFade, idel and run are perfect now , but Fire animation is impotence when I use CrossFade …
when I use “Play”, Fire animation has to work but it has clear jump .

my script … Thanks

function Start ()
{

animation.wrapMode = WrapMode.Loop;
animation[“idleFire”].wrapMode = WrapMode.Once;
animation[“idleFire”].layer = 1;
animation[“runFire”].wrapMode = WrapMode.Once;
animation[“runFire”].layer = 1;

animation.Stop();

}

function Update () {

if (Mathf.Abs(Input.GetAxis(“Horizontal”)) || Mathf.Abs(Input.GetAxis(“Vertical”)) > 0.1) {
animation.CrossFade(“run”);

if (Input.GetKeyDown (“space”)) {
animation.Play(“runFire”);
}
}
else {
animation.CrossFade(“idle”);
if (Input.GetKeyDown (“space”)) {
animation.Play(“idleFire”);
}

try adding a time delay to crossfade and see if that works for you:

you can also try to do an animation.Stop() before loading a new animation.

if (Input.GetKeyDown (“space”)) {

animation.Stop();
anmiation.CrossFade(“runfire”, 0.5);

}

thats the only things i can suggest. hope you figure it out

You might solve it by giving the firing animations a higher layer number than the idle/run ones, then they get a higher priority. Otherwise, idle/run probably goes in and override the firing animations.