daniel202gaming wrote:MisterNinjaBoy wrote:Make a new script, and use this to stop animations. Attach this script to you're gun.Code:
function Update()
{
if(Input.GetKeyUp("w"))
{
// Plays the _____ animation - stops all other animations
animation.CrossFade("idle");
}
}
Whenever I try press w the console says
The animation state M9IdleAnimation(My Walking Animation) could not be played because it could not be found. ):
My idle animation is called IdleM9 just to be clear about that.
It is extremely annoying because I cannot get 1 stupid animation to play.
PLEASE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11
Try this:
Code:
var AnimationClip : AnimationClip ;
function Update() {
if (Input.GetKeyDown (KeyCode.W))
{
animation.Play();
}
}