last animation which was played

how can i command and ask if The last animation which was played is Ex(“walk”) play anther animation i couldnt use animation.IsPlaying and animation.Stop isn’t a bool?

Several animations can be played at the same time and blended, so you can’t really ask for the last animation. You can store somewhere yourself though. For instance, create a string to store the animation clip’s name and use this function instead of Play :

var lastAnim : String;
var currAnim : String;
function PlayAndStore( newAnim : String )
{
    lastAnim = currAnim;
    currAnim = newAnim;
    animation.Play(currAnim);
}