Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink

You are not connected. Please login or register

Unity Ninja Unity 3D Forum » HELP » Help (General) » Animations

Animations

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Animations on Tue Feb 11, 2014 11:56 am

AlecGomez30


Member [Lv. 2]
Member [Lv. 2]
I am following your steps on tutorial #3 for making an FPS game, and the animation won't work properly. It keeps saying :

MissingComponentException: There is no 'Animation' attached to the "M4A3" game object, but a script is trying to access it.
You probably need to add a Animation to the game object "M4A3". Or your script needs to check if the component is attached before using it.
walkingscript.Update () (at Assets/Guns/Gun Scripts/walkingscript.js:6)

View user profile

2 Re: Animations on Tue Feb 11, 2014 4:08 pm

TheReddestDawn


Member [Lv. 2]
Member [Lv. 2]
I had a similar problem. I just restarted my project from the start.

View user profile

3 Re: Animations on Tue Feb 11, 2014 4:27 pm

AlecGomez30


Member [Lv. 2]
Member [Lv. 2]
Did it work TheReddestDawn?

View user profile

4 Re: Animations on Tue Feb 11, 2014 5:03 pm

TheReddestDawn


Member [Lv. 2]
Member [Lv. 2]
Was just working on it and sadly no. I have the same error you have, and when I try to play the game what occurs is that the animation is constantly playing on a loop, no matter whether you are pressing W or if you're pressing nothing. I've tried taking the animation from my assets and putting it into the Gun (I parented my hands to my gun, so that's where the animation is) For some reason it still doesn't work  Sad 

View user profile

5 Re: Animations on Tue Feb 11, 2014 5:14 pm

AlecGomez30


Member [Lv. 2]
Member [Lv. 2]
Maybe we should ask MisterNinjaBoy

View user profile

6 Re: Animations on Tue Feb 11, 2014 5:45 pm

TheReddestDawn


Member [Lv. 2]
Member [Lv. 2]
Hopefully they will see our post, alas for now we can just post spiderman memes.

View user profile

7 Re: Animations on Tue Feb 11, 2014 5:50 pm

AlecGomez30


Member [Lv. 2]
Member [Lv. 2]
Lol  lol! 

View user profile

8 Re: Animations on Tue Feb 11, 2014 10:27 pm

The only way you are getting this error, is as stated by the error; You don't have the animation component attached to the model you added the script to. Make sure you do the parenting correctly (Gun and hands parented to each other) and then attached to main camera, then make sure the gun and hands (whichever the parent is) has animations, (and the animationcomponent) Then the script should be able to access the defined animation accordingly. (if you correctly named which anim to play in the script.)

View user profile http://www.youtube.com/user/misterninjaboy

9 Re: Animations on Wed Feb 12, 2014 10:05 am

AlecGomez30


Member [Lv. 2]
Member [Lv. 2]
I got this error:

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

Please help MisterNinjaBoy

View user profile

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum