- Edited
Hi everyone. I have the following problem:
I have an enemy that plays an attack-animation once it is in range of the player. That part is easy, just a conditional-transition from the run state to the attack state in the animationtree.
Now the problem is that my attack-animation is looping, because when the player just stops and the enemy stays in range, the attack should obviously happen more than once.
Now my problem: When the player gets out of range again, the animation tree should obviously switch back to the run state, which it doesn't do. I am guessing this is because my "at end"-transition from the attack state back to the run state is not happening because the animation is infinitely looping, so it doesn't "end".
Any idea how I can fix this?