Play animation on pawn from BP

Hello

How do I play a animation on my pawn from a BP…

I got a Base weapon blueprint and every weapon is a child of that blueprint, which contain all the variables like muzzleflash, sound, gun animations etc.

I’m trying to setup my pawn firing animations in the base weapon blueprint, But I’m unsure how I do this…

Tried adding “play animation” to the single shot function inside my WeaponBP. The animation works when firing, but it breaks my animation BP so my Aimoffset is not working after i shoot and I’m only able to rotate the camera.

What is the best way to do this?

Check out my answer here -

It did help with Anim montage. But when I shoot, my pawn arms are moved to the position they have in the animation montage and then back to where I’m aiming?

I’m using a third person mesh with FPS camera, so i need it to work with my aimoffset.

Also is there no way to keep it all inside the weapon BP, so I keep mycharacter clean of all weapon variables?

Here is my firing BP inside mycharacter with Anim montage attached:

You need to make sure that your aimoffset is placed after your animation slot. This way additive animations will still work when you shoot.

I’m not sure that I got the second question correctly. This is happening in the animation blueprint, it’s the right place for such things to be.

Yeah I forgot the slot, the animation is now working with aimoffset.

Edit:

Fixed the problem… forgot I could make Anim montage in the weapons blueprint by dragging of get player character node…

Now everything works correctly…

And thanks Breeg

No problems, glad it worked out! Just tell me if you need any more help on this thing. I’ve converted my comment into answer for tracking purposes.