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.


help the walking animation is not working!!!!

power_settings_newLogin to reply
4 posters

descriptionhelp the walking animation is not working!!!! Emptyhelp the walking animation is not working!!!!

more_horiz
the walking animation thing didn't work for me when i didn't press "W" it made the animation but when i pressed it the whole thing crashed so i deleted the script but it still keeps doing the walking animation help!!!!!!

descriptionhelp the walking animation is not working!!!! EmptyRe: help the walking animation is not working!!!!

more_horiz
I use this Script created by me Very Happy:


FIRST SCRIPT (PLAY ANIMATION):  

Code:

var AnimationClip : AnimationClip ;
function Update() {

if (Input.GetKeyDown (KeyCode.W))
{
    animation.Play();
 
}

}





SECOND SCRIPT (STOP ANIMATION):

Code:

var AnimationClip : AnimationClip ;
function Update() {

 if (Input.GetKeyUp (KeyCode.W))
{
    animation.Stop();
 
}

}


Last edited by developer23 on Thu Jun 05, 2014 9:04 am; edited 4 times in total

descriptionhelp the walking animation is not working!!!! EmptyRe: help the walking animation is not working!!!!

more_horiz
Please next time, post in the right section, it keeps things in order. Moved it.

descriptionhelp the walking animation is not working!!!! EmptyRe: help the walking animation is not working!!!!

more_horiz
MisterNinjaBoy wrote:
Please next time, post in the right section, it keeps things in order. Moved it.

sorry, but I did not understand what should I move

No sorry, not you. I meant the OP.

descriptionhelp the walking animation is not working!!!! EmptyRe: help the walking animation is not working!!!!

more_horiz
developer23 wrote:
MisterNinjaBoy wrote:
Please next time, post in the right section, it keeps things in order. Moved it.

sorry, but I did not understand what should I move


No he means that he moved your message to the right section. lol! 

descriptionhelp the walking animation is not working!!!! EmptyRe: help the walking animation is not working!!!!

more_horiz
developer23 wrote:
I use this Script created by me Very Happy:


FIRST SCRIPT (PLAY ANIMATION):  

Code:

var AnimationClip : AnimationClip ;
function Update() {

if (Input.GetKeyUp (KeyCode.W))
{
    animation.Play();
 
}

}





SECOND SCRIPT (STOP ANIMATION):

Code:

var AnimationClip : AnimationClip ;
function Update() {

 if (Input.GetKeyUp (KeyCode.W))
{
    animation.Stop();
 
}

}



I've noticed that these line exists in both codes :
if (Input.GetKeyUp (KeyCode.W))
.........................................................
Did you want to write :
 if (Input.GetKeyDown (KeyCode.W)) ?

descriptionhelp the walking animation is not working!!!! EmptyRe: help the walking animation is not working!!!!

more_horiz
Yes,sorry,Input.GetKeyUp ahahahah

Last edited by developer23 on Thu Jun 05, 2014 9:04 am; edited 1 time in total

descriptionhelp the walking animation is not working!!!! EmptyRe: help the walking animation is not working!!!!

more_horiz
I am confused with the stop script ahahha

descriptionhelp the walking animation is not working!!!! EmptyRe: help the walking animation is not working!!!!

more_horiz

Code:

if (Input.GetKeyDown (KeyCode.W))

descriptionhelp the walking animation is not working!!!! EmptyRe: help the walking animation is not working!!!!

more_horiz
developer23 wrote:

Code:

if (Input.GetKeyDown (KeyCode.W))


Is using this script to animate the player without character controller will make the animations realistic and smove?  Question

descriptionhelp the walking animation is not working!!!! EmptyRe: help the walking animation is not working!!!!

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