Download

Multiple idle animations (AnimBlueprint) issues

Hello guys, I’m having issues with assigning multiple idle animations for my game. I’m trying to get my animations to play and once they’re finished, play another in a random way. But each time I try to do so, all I get is a shaky mesh or my animations play all at once, is there anything I could to get it done?

366b5d22cf1a8fa202413a0d7bc9977b4b9bc493.jpeg

Hey fdslk,

You’re probably getting jittery animation because in that blueprint you’re actually changing the active child index every frame! What would be better to do would be to generate the integer in the Event Graph and cache it and use it in the Animation Blueprint. Then add notify events to the end of your idle animations (EndIdle for example). Use these custom events in your Event Graph to calculate and cache a new active child index. This should sort out your animation problems.

Benn.

Sorry Exelcior, but I don’t get what you exactly mean with cache it, do you mean make the int a public variable?

You have to save the result of your “Random Integer in Range” and feed your animation blueprint with that value.

Hey again fdslk,

Sorry it took me a while to get back to you - been out of the office today.

First you’ll want to go and add a custom event notify (Right Click -> Add Notify -> New Notify) to the animations you are using, after you have added the event once it should just show up in the Right Click -> Add Notify context menu for other animations:
RandomAnim_Anim.png

I’ve called it AnimEnd here, but you can call it whatever you like. Next, add an integer variable to your anim blueprint and set a random value to it on both initialise and on your custom event:
b5d0de5c7ba2ae5e50c601cbc63f83bf7111011a.png

Finally hook it all up to a blend by int node in the anim graph:
816c533b447bfef43c88db1efdeebd00661f3980.png

That should get you the effect that you’re after.

If you need anything else let me know!

Benn.

Hey Benn! Ty, just saw this post, I manage to do so using animation montages, gonna give this a try now :smiley: