function Start(){
animation[“I2J”].wrapMode = WrapMode.Once;
animation[“I2R”].wrapMode = WrapMode.Once;
animation[“R2J”].wrapMode = WrapMode.Once;
animation[“R2I”].wrapMode = WrapMode.Once;
animation[“R”].wrapMode = WrapMode.Loop;
animation[“I2J”].speed = 2.6;
}
function Update(){
var other : Movement = gameObject.GetComponent(Movement);
//Run animation
if(Input.GetKey("w") && !animation.IsPlaying("I2J") && !animation.IsPlaying("J")&& !animation.IsPlaying("R")){
animation.CrossFade("I2R");
animation["I2R"].speed = 3;
if(!animation.IsPlaying("I2R")){
animation.Stop("I2R");
run();
}
The I2R is reapiting and the run function didnt happeen?!