- Home /
Animation scripting
Hi, I'm thinking of making a combo animation in 3ds max and having 2 or three different animations in one. That way all I have to do is tell it to play that part of the animation. The only problem is I dont know how to script that.
How would I say
if(idleState)
{
animation.Play(frames 0-25);
Loop back to frame 0 after 25 is done;
}
The proper way?
Thank you!
I figured it out (with help) but I'm using the modelName@AnimationName technique. I now have another (related) question: if I have this:
Object@idle
Object@walk
Object@fly
In my project, and another animation-less "Object" and I put that in my scene, in the script attached to that, would I say
animation.Play(idle);
animation.Play(walk);
Etc.? If not, how is that scripted?
Answer by Steffen Franz · Jan 20, 2011 at 10:53 PM
split the combined animation into named pieces you can refer to in your script.
Unity Manual > User Guide > Asset Import and Creation > Animations
Ok. Thanks I was looking in the manual (everywhere but there) and on UA. But I used to think by importing several names@state would only work by instantiating them (I'm new to animating) but now I guess say to have one original file with no animation, some other files with their animations and saved as name@state. And to play one, you'd reference them? Like animation.Play(stateName)?
Your answer
Follow this Question
Related Questions
Lane moving vehicle 1 Answer
Animator switching between floats 1 Answer
How to get blended animations into the scene 0 Answers
Animations and Rotation of character 2 Answers
I want to sync my animations with eachother via Animator.SetTrigger 0 Answers