Hi, So I made a basic animation and attached it to a sword. (First Person MMO?) It will make the sword swing. But I am not a scripter!!! How do I start this animation when I press a certain button??? I want to swing the sword by clicking the mouse. Is this a trigger??? Please help!
asked Aug 03 '10 at 02:49 PM
animation.CrossFade("name of the animation");
This should be simple enough. Make sure you've assigned the animation to the object and assign this code to your sword. It should work.
answered Aug 03 '10 at 03:00 PM
You should make sure that in the Inspector Window your Sword object should have the name of the animation that you're going to use under the "animation" box. Click on your Sword object, in the Inspector Window there should be a part called "Animation". There's usually a standard one that comes with the model. Add your animation there. Hope this helps.
This could also be useful;
answered Aug 03 '10 at 05:48 PM