Our any state recipient, catching breathe, needs to be controlled by scripting. …To get it hooked up by our script, we'll need to make another parameter to manage it. …We have two choices here. We need one we can turn on then off to …start the state, and we need another to exit the state. …These can both be boolean types. Or, we could use an int type and have …three states. Zero, not out of breathe, 1, going into …the out of breath state and 2, in the out of breath state.…

Since we're already getting pretty crowded in the perimeter section, let's …go with the latter. So delete the winded, add the new int …type And we'll name this one: winded state. …And we'll leave it initialized to 0. Now we need to fix the transitions. …From the any state to catching breath, the condition is going to be Winded state …equals one, and from catching breath to idle, winded state is going to equal …zero, so we're good to go on this one. In our basic character control script …let's go ahead and create a matching variable winded state.…

Resume Transcript Auto-Scroll

Author

Released

6/14/2013

Learn to bring your 3D game characters to life with the help of Mecanim, Unity's new character animation system. Start by importing characters and mapping their bone and muscle structure. Create animation controllers and add existing animations to help them move through and interact with their environment. Learn how to blend and mask animation clips to create sophisticated in-game animations on the fly. Author Sue Blackman guides you through the intricacies of Mecanim as you learn to control an assortment of game characters in a variety of situations.