UnityNinja Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.

UnityNinja CommunityLog in

UnityNinja - Video Game Development Community, including Resources, Forums, Marketplace & More.


descriptionWalking Animation not working EmptyWalking Animation not working

more_horiz
Hey there,

Ik get the following error when i set walking animation for my gun

The animation state walking animation 3 could not be played because it couldn't be found!
Please attach an animation clip with the name 'walking animation 3' or call this function only for existing animations.
UnityEngine.Animation:Play(String, PlayMode)
walkingscript:Update() (at Assets/walkingscript.js:6)

descriptionWalking Animation not working EmptyRe: Walking Animation not working

more_horiz
I'm not a animation expert but if you are watching tutorial 3 go to tutorial 5 and he explains how to do it the right way at the end.

descriptionWalking Animation not working EmptyRe: Walking Animation not working

more_horiz
Hello,
my problem is this: I followed steps very carefully, I created animation, which is working. But when I play the game and press "w" or any other key, nothing happens. Yes, I moved the file to my gun, I aslo tried moving it to hand, but none of it is working. Im using windows 8, 64x, unity version 4.3.3.

Thanks for reply!! I really like this!

descriptionWalking Animation not working EmptyRe: Walking Animation not working

more_horiz
Yeah, I have the same problem as Tigris, and also have Windows 8.1 64x. Any help would be greatly appreciated.

descriptionWalking Animation not working EmptyRe: Walking Animation not working

more_horiz
here is a script to use:

Code:

#pragma strict
function Update () {
if(Input.GetKeyDown("w"))
{
animation.Play("walk", PlayMode.StopAll);
Debug.Log("played walk animation");
}
if(Input.GetKeyDown("d"))
{
animation.Play("rightsidestep", PlayMode.StopAll);
Debug.Log("played rightsidestep animation");
}
if(Input.GetKeyDown("s"))
{
animation.Play("leftsidestep", PlayMode.StopAll);
Debug.Log("Played Left Side Step Animation");
}
if(Input.GetKeyDown("w"));
animation.Play("backstep", PlayMode.StopAll);
Debug.Log("Played backstep animation");

}

this code should help you, just make sure to rename your animations to the ones in the script
This script was made by me, please give me a little credit, not too much though Wink

descriptionWalking Animation not working EmptyRe: Walking Animation not working

more_horiz
Thank you for your help, and script. I got it working :p

descriptionWalking Animation not working EmptyRe: Walking Animation not working

more_horiz
MistaMcswagg wrote:
Thank you for your help, and script. I got it working :p
thanks Razz

descriptionWalking Animation not working EmptyRe: Walking Animation not working

more_horiz
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply