Abort current animation in state machine
Is there anyway to abort an animation/state within an state machine? I have created the following state machines in an Animation Blueprint:
Now, The Moving state contains 3 different animations in a blend space (Idle, Walk and Run), The attack holds one animation and the same for Shaking. The problem is that if the "Attacking" state should be fired and the "Shaking" animation is currently being played, the "Shaking" animation should stop so it can fire the "Attacking" state instead.
Does anyone know if this is possible?
Within the character blueprint (which is using this BP animation) the shaking state gets set randomly, but as soon a target is within sight the Attacking state gets fired, which means that it can happend in the middle of the "Shaking" state.
Thanks for any tips!
asked Mar 31 '18 at 08:08 PM in Blueprint Scripting
I managed to fix it like this:
In the Character blueprint the AI can attack and chase the player. In this case I don't want to stay in the current transition. So in the transition itself I check the value of these variables. The variables are updated by the Blueprint Update Animation event:
I highly recommend watching this video with Wes Bunn as well as an alternative (better) way to do it https://www.youtube.com/watch?v=YVC-DL9Ibf0
Follow this question
Once you sign in you will be able to subscribe for any updates here