Basic control
Depending on the state of the two instance variables we are now able to select the adequat animation. Make sure that the walking animations are set to loop
Actually, most of the animation and controls shoud work, but if the Trooper turns, he stops. We want him to continue walking after turning. So we need to react on the finished animation.
Again, we are not controling the animation, but the status of a variable.
Stop the move
The only thing that is left, is how to stop the whole animation, when the Avatar is clicked on.
This time, we actually control the animation and stop the running one, then setting the current to the appropriate idle animations.
...and that's it!! Your Avatar should now follow your commands!
Let me know, if you need any further information.