How can I play randomic animations in layered blend per bone?

Hi guys, I want to make an animal that could make noises randomically, so I made a layered blend per bone where the neck and the head could move and make a roar animation, but I don’t know how i can play that randomically. Could someone help me? Thanks

Connect all your animations to a “Blend Poses by int” node. Then all you need to do is feed the int value with a random int, you could use “Random Integer in Range” node for that. Ideally you should run random integer in range when the event is fired, promote that value to a variable, and use that variable on the blend poses by int node.

Thank you very much! Have you got some screenshots about that?

A Warning Message appears

You are welcome! I’m glad I could help.

Yes that warning is because you are doing the random int calculation inside the anim graph, it will work but it is not recommended, you should do the calculation inside the event graph and feed the result into the anim graph.

Here is some screen shots, as an example I started a looping timer on begin play to calculate a new random int every ten seconds and save it to a variable. (You might want the int to be calculated every time an event occurs instead, that way you wouldn’t have a timer constantly running, but this might work good for your case.)

Event Graph:

Then I reference that random int in the anim blueprint, just make sure your int is within the range of animations you have plugged in. In this case I plugged in 4 animations so my random int range is 0 to 3. (Because the blend poses by int starts at 0).

Anim Graph:

How can I realize the same scenario of playing Anim Sequences by Blend Poses by Int but ensuring it plays automatically? When I feed the int value I need to make sure those anim sequence plays from start to end (each) and then another anim sequence gets selected based on Int value being fed?