I’m trying to make my zombie AI play a random idle animation when it enters the idle state, but I want it to loop that specific animation until idle is triggered again. Right now, using the Random Sequence Player makes it switch animations after each loop, which I don’t want.
Is there any way to achieve this?
Watch tutorials about Choosers.
Then create chooser for your random idle anims. And drive it from enum (choosers sadly do not cooperate with game tags, or i could not make them do it).
Then you set events (or just check length of anim and trigger code when they finished).
And change that enum, so chooser picks different anim and anim blueprint will animate different anim.
ps.
Changing animation in middle of loop can cause some jitters, because you have no transitioning animation from one idle to another.
There is experimental plugin that smooths those transitions.
There is acrually an old forum post with detailed instructions on doing just this in relation to having sat in the idle state too long.
And it had some tricks on how to blend from one pose to another which
@Nawrot really?
Essentially just take a pose snapshot, and toss the animation state machine into a state using said snapshot, then transition out to whatever else.
It should be something you can rig together in about 10 minutes.
Try it out