- Home /
Question by
LeftyTwoGuns · Feb 16, 2015 at 11:56 PM ·
animationmecanimif-statements
Don't play another animation if a specific animation is already playing?
I have a character scripted to randomly play an animation if something happens:
if(Random.value < 0.35f){
Debug.Log("Play animation");
}
There will also be about 6 or so different animations that could play if that random value is met. How do I amend that to say: "if random value is met and the character is not already animating one of those 6 specific animations, do the animation"...? This is a Mecanim character, to clarify
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613183522im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Mecanim animation keeps running infinite 1 Answer
AddMixingTransform with Mecanim 1 Answer
Add more bones to skeleton - vertebraes definition...? 0 Answers
Mecanim Animate Physics - When to use? 0 Answers
Tweaking a Walk Cycle 0 Answers