How to switch NPC anim after current one finished

Hello All,

I have a Market stall NPC and i want it to pick a randon Anim from a set and play it and when it finishes pick another. Currently I have a function on the Charactor Actor and set a varible to a random INT(Figure 1), and a state machine that chooses a anim based on the randon INT(figure 2). I dont think this is scaleable and not the most efficent way of doing this. Also because the Anims are diffrent length the state machine sometimes switches anims in the middle of the current anim.

any help or a point in the right direction would be appericated.

Expose the animation sequence as a pin and create an array with all your animations. Create a doOnce that picks a random animation and resets when you go back to idle.

Thanks! I did a little research into exposing anim sequences and came across the Random Sequence Player node, which does what I need, Thanks again.