Play Animations using DataTable

I have arms mesh for the player and 2 guns each of which has its Animation Blueprint and pair of animations for a weapon such as fire, reload, etc. And heads mesh has separate animations for each weapon, e.g. idle animation.
I have a Data table filled with all animations for the player and another table filled with animations for a weapon.
How can I read animations from DataTable and play it as animations for proper gun and arms?

Thanks in advance.

1 Like

Hi. Sorry if it is a dumb question. I’m new to unreal engine. How did you store animation in the datatable? Can’t seem to find the right datatypes etc. Thanks.

Why not make a data table of structs that would contain the correct combination of arms and weapon animations?

How to do it? Do you mind to share any post?

0




1 Like

I though, you (3dRaven) meant to use data table in Anim BP. Maybe it’s possible but I have no clue to do it.

With your example/screenshot you are using the animation from DataTable in Character BP, right? For example; reload animation:

For now I don’t see a way to use DataTable in AnimBP and i’m working on this; from enum get the weapon and use a BlendSpace/Pose:

You can use the data table in the anim bp. Just add a variable of type DataTable => compile => select the new variable and select the created animation Data Table

Or you can just inject it with a node like this

And after break data? I have ‘animation sequence’ can’t link it to final result or state machine, etc

What is set in the anim part of the struct? is it an anim sequence?

Yes, anim sequence

Insert Sequence Player => Select it => Bind => Expose as pin. You can now hook up “Anim Sequence Base” to the player.

4 Likes