- Home /
How do I prevent an animation trigger parameter from activating while the animation it triggered is playing?
I currently have an animation trigger runAction1 set up to transition from the Run state into the RunningActions sub-state machine. In my code, I enable this trigger at the click of a mouse, which calls the following code. MovingAction1() enables the runAction1 trigger.
protected override void AttackDashGround (){
movement.DashHorizontal (150);
animatorController.MovingAction1 ();
}
My issue is that it is possible to click again while RunningActions is active, thus re-enabling runAction1 and causing the state machine to automatically transition from Run to RunningAction the next time it transitions from Idle to Run. I want to prevent being able to activate triggers while an animation is playing.
Your answer
![](https://koobas.hobune.stream/wayback/20220612150121im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Animator does not reset well when reactivating object 3 Answers
Trigger not playing Animation 0 Answers
How to access and modify an animator state transition in runtime? 1 Answer
Play animation from animator? 1 Answer
Interrupt shoot animation (in Animator) to play again every time the player shoots 0 Answers